diff options
author | Bin Sun <bins@vmware.com> | 2018-03-26 16:17:06 +0800 |
---|---|---|
committer | Bin Sun <bins@vmware.com> | 2018-03-26 16:17:06 +0800 |
commit | 4e25e165a08aa139ac349da6d8958c9b0b41d127 (patch) | |
tree | 44305898fc538ca6c92d9610cbafa67fe5613a0c /vio | |
parent | 98b44bd19ff6bfdd5be0a8c57acbec17c02d80fc (diff) |
Add Subnets API in new API framework
Change-Id: I01570cc2beeb2697d04dc81b30ef59a6c59002af
Issue-ID: MULTICLOUD-152
Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/api_v2/api_definition/subnets.yaml | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/vio/vio/api_v2/api_definition/subnets.yaml b/vio/vio/api_v2/api_definition/subnets.yaml new file mode 100644 index 0000000..bbe35c0 --- /dev/null +++ b/vio/vio/api_v2/api_definition/subnets.yaml @@ -0,0 +1,88 @@ +--- + info: + version: "1.0.0" + title: "Multi Cloud Subnet" + description: "Definition of Subnet API" + termsOfService: "http://swagger.io/terms/" + schemes: + - "http" + produces: + - "application/json" + paths: + /{vimid}/{tenantid}/subnets/{subnetid}: + parameters: + - type: string + name: vimid + - type: string + format: uuid + name: tenantid + - type: string + name: subnetid + in: path + required: true + get: + produces: + - "application/json" + responses: + "200": + schema: + $ref: "#/definitions/subnet" + get_all: + produces: + - "application/json" + responses: + "200": + schema: + type: "array" + items: + $ref: "#/definitions/subnet" + post: + produces: + - "application/json" + responses: + "200": + schema: + $ref: "#/definitions/subnet" + delete: + responses: "204" + vim_path: "/network/v2.0/subnets" + definitions: + subnet: + plural_vim_resource: "subnets" + vim_resource: "subnet" + plural: "subnets" + properties: + name: + type: string + required: true + source: subnet.name + id: + type: string + source: subnet.id + status: + type: string + source: subnet.status + networkId: + type: string + source: subnet.network_id + required: true + allocationPools: + source: subnet.allocation_pools + gatewayIp: + type: string + source: subnet.gateway_ip + default: None + tenantId: + type: string + source: subnet.tenant_id + enableDhcp: + type: boolean + source: subnet.enable_dhcp + ipVersion: + source: subnet.ip_version + dnsNameServers: + source: subnet.dns_nameservers + cidr: + source: subnet.cidr + hostRoutes: + source: subnet.host_routes |