Improve coverage of multicloud-azure plugin
[multicloud/azure.git] / azure / multicloud_azure / api_v2 / api_definition / ports.yaml
1 ---
2   info:
3     version: "1.0.0"
4     title: "Multi Cloud Port"
5     description: "Definition of Port API"
6     termsOfService: "http://swagger.io/terms/"
7   schemes:
8     - "http"
9   produces:
10     - "application/json"
11   paths:
12     /{vimid}/{tenantid}/ports/{portid}:
13       parameters:
14         - type: string
15           name: vimid
16         - type: string
17           format: uuid
18           name: tenantid
19         - type: string
20           name: portid
21           in: path
22           required: true
23       get:
24         produces:
25           - "application/json"
26         responses:
27           "200":
28             schema:
29                 $ref: "#/definitions/port"
30       get_all:
31         produces:
32           - "application/json"
33         responses:
34           "200":
35             schema:
36                 type: "array"
37                 items:
38                   $ref: "#/definitions/port"
39       post:
40         produces:
41           - "application/json"
42         responses:
43           "200":
44             schema:
45                 $ref: "#/definitions/port"
46       delete:
47          responses: "204"
48       vim_path: "/network/v2.0/ports"
49   definitions:
50     port:
51       plural_vim_resource: "ports"
52       vim_resource: "port"
53       plural: "port"
54       properties:
55         name:
56           type: string
57           required: true
58           source: port.name
59         id:
60           type: string
61           source: port.id
62         status:
63           type: string
64           source: port.status
65         networkId:
66           type: string
67           source: port.network_id
68           required: true
69         vnicType:
70           source: port.binding:vnic_type
71         securityGroups:
72           type: string
73           source: port.security_groups
74         tenantId:
75           type: string
76           source: port.tenant_id
77         macAddress:
78           type: string
79           source: port.mac_address
80         subnetId:
81           source: port.fixed_ips[0].subnet_id
82         ip:
83           source: port.fixed_ips[0].ip_address