Added V0 Registry API
[multicloud/azure.git] / azure / multicloud_azure / api_v2 / api_definition / subnets.yaml
1 ---
2   info:
3     version: "1.0.0"
4     title: "Multi Cloud Subnet"
5     description: "Definition of Subnet API"
6     termsOfService: "http://swagger.io/terms/"
7   schemes:
8     - "http"
9   produces:
10     - "application/json"
11   paths:
12     /{vimid}/{tenantid}/subnets/{subnetid}:
13       parameters:
14         - type: string
15           name: vimid
16         - type: string
17           format: uuid
18           name: tenantid
19         - type: string
20           name: subnetid
21           in: path
22           required: true
23       get:
24         produces:
25           - "application/json"
26         responses:
27           "200":
28             schema:
29                 $ref: "#/definitions/subnet"
30       get_all:
31         produces:
32           - "application/json"
33         responses:
34           "200":
35             schema:
36                 type: "array"
37                 items:
38                   $ref: "#/definitions/subnet"
39       post:
40         produces:
41           - "application/json"
42         responses:
43           "200":
44             schema:
45                 $ref: "#/definitions/subnet"
46       delete:
47          responses: "204"
48       vim_path: "/network/v2.0/subnets"
49   definitions:
50     subnet:
51       plural_vim_resource: "subnets"
52       vim_resource: "subnet"
53       plural: "subnets"
54       properties:
55         name:
56           type: string
57           required: true
58           source: subnet.name
59         id:
60           type: string
61           source: subnet.id
62         status:
63           type: string
64           source: subnet.status
65         networkId:
66           type: string
67           source: subnet.network_id
68           required: true
69         allocationPools:
70           source: subnet.allocation_pools
71         gatewayIp:
72           type: string
73           source: subnet.gateway_ip
74           default: None
75         tenantId:
76           type: string
77           source: subnet.tenant_id
78         enableDhcp:
79           type: boolean
80           source: subnet.enable_dhcp
81         ipVersion:
82           source: subnet.ip_version
83         dnsNameServers:
84           source: subnet.dns_nameservers
85         cidr:
86           source: subnet.cidr
87         hostRoutes:
88           source: subnet.host_routes