Update tag to be more generic
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / multivim.network.swagger.json
1 {
2     "swagger": "2.0",
3     "info": {
4         "version": "1.0.0",
5         "title": "MultiVIM Service rest API"
6     },
7     "basePath": "/openoapi/multivim/v1/",
8     "tags": [
9         {
10             "name": "MultiVIM services"
11         }
12     ],
13     "paths": {
14         "/{vimid}/{tenantid}/networks": {
15             "post": {
16                 "tags": [
17                     "vim networks"
18                 ],
19                 "summary": "create a network",
20                 "description": "create a network",
21                 "operationId": "create_vim_network",
22                 "consumes": [
23                     "application/json"
24                 ],
25                 "produces": [
26                     "application/json"
27                 ],
28                 "parameters": [
29                     {
30                         "name": "vimid",
31                         "in": "path",
32                         "description": "vim instance id",
33                         "required": true,
34                         "type": "string"
35                     },
36                     {
37                         "name": "tenantid",
38                         "in": "path",
39                         "description": "tenant UUID",
40                         "required": true,
41                         "type": "string"
42                     },
43                     {
44                         "in": "body",
45                         "name": "body",
46                         "description": "create vim network request param",
47                         "required": true,
48                         "schema": {
49                             "$ref": "#/definitions/CreateVimNetwork"
50                         }
51                     }
52                 ],
53                 "responses": {
54                     "200": {
55                         "description": "successful operation",
56                         "schema": {
57                             "$ref": "#/definitions/VimNetworkInfo"
58                         }
59                     },
60                     "404": {
61                         "description": "the vim id or tenant UUID is wrong"
62                     },
63                     "500": {
64                         "description": "the vim network is not accessable"
65                     }
66                 }
67             },
68             "get": {
69                 "tags": [
70                     "vim networks"
71                 ],
72                 "summary": "query vim networks list",
73                 "description": "query vim networks list",
74                 "operationId": "query_vim_networks",
75                 "consumes": [
76                     "application/json"
77                 ],
78                 "produces": [
79                     "application/json"
80                 ],
81                 "parameters": [
82                     {
83                         "name": "vimid",
84                         "in": "path",
85                         "description": "vim instance id",
86                         "required": true,
87                         "type": "string"
88                     },
89                     {
90                         "name": "tenantid",
91                         "in": "path",
92                         "description": "tenant UUID",
93                         "required": true,
94                         "type": "string"
95                     },
96                     {
97                         "in": "body",
98                         "name": "body",
99                         "description": "get a list of vim networks request param",
100                         "required": false,
101                         "schema": {
102                             "$ref": "#/definitions/ListVimNetworks"
103                         }
104                     }
105                 ],
106                 "responses": {
107                     "200": {
108                         "description": "successful operation",
109                         "schema": {
110                             "$ref": "#/definitions/VimNetworksInfo"
111                         }
112                     },
113                     "404": {
114                         "description": "the vim id or tenant UUID is wrong"
115                     },
116                     "500": {
117                         "description": "the vim network is not accessable"
118                     }
119                 }
120             }
121         },
122         "/{vimid}/{tenantid}/networks/{networkid}": {
123             "delete": {
124                 "tags": [
125                     "vim networks"
126                  ],
127                  "summary": "delete specific vim network",
128                 "description": "delete specific vim network",
129                 "operationId": "delete_vim_network",
130                 "consumes": [
131                     "application/json"
132                 ],
133                 "produces": [
134                     "application/json"
135                 ],
136                 "parameters": [
137                     {
138                         "name": "vimid",
139                         "in": "path",
140                         "description": "vim instance id",
141                         "required": true,
142                         "type": "string"
143                     },
144                     {
145                         "name": "tenantid",
146                         "in": "path",
147                         "description": "tenant UUID",
148                         "required": true,
149                         "type": "string"
150                     },
151                     {
152                         "name": "networkid",
153                         "in": "path",
154                         "description": "vim network id",
155                         "required": true,
156                         "type": "string"
157                     }
158                 ],
159                 "responses": {
160                     "204": {
161                         "description": "successful operation"
162                     },
163                     "404": {
164                         "description": "the vim id or tenant UUID is wrong"
165                     },
166                     "500": {
167                         "description": "the network is not accessable"
168                     }
169                 }
170             },
171             "get": {
172                 "tags": [
173                     "vim networks"
174                 ],
175                 "summary": "query specific vim network",
176                 "description": "query specific vim network",
177                 "operationId": "query_vim_network",
178                 "consumes": [
179                     "application/json"
180                 ],
181                 "produces": [
182                     "application/json"
183                 ],
184                 "parameters": [
185                     {
186                         "name": "vimid",
187                         "in": "path",
188                         "description": "vim instance id",
189                         "required": true,
190                         "type": "string"
191                     },
192                     {
193                         "name": "tenantid",
194                         "in": "path",
195                         "description": "tenant UUID",
196                         "required": true,
197                         "type": "string"
198                     },
199                     {
200                         "name": "networkid",
201                         "in": "path",
202                         "description": "vim network id",
203                         "required": true,
204                         "type": "string"
205                     }
206                 ],
207                 "responses": {
208                     "200": {
209                         "description": "successful operation",
210                         "schema": {
211                             "$ref": "#/definitions/VimNetworkInfo"
212                         }
213                     },
214                     "404": {
215                         "description": "the vim id or tenant UUID is wrong"
216                     },
217                     "500": {
218                         "description": "the vim network is not accessable"
219                     }
220                 }
221             }
222         }
223     },
224     "definitions": {
225         "CreateVimNetwork": {
226             "type": "object",
227             "required": [
228                 "networkType",
229                 "name",
230                 "shared"
231             ],
232             "properties": {
233                 "name": {
234                     "type": "string",
235                     "description": "network name"
236                 },
237                 "networkType": {
238                     "type": "string",
239                     "description": "network type"
240                 },
241                 "physicalNetwork": {
242                     "type": "string",
243                     "description": "physical network name"
244                 },
245                 "segmentationId": {
246                     "type": "integer",
247                     "description": "segmentation ID of physical network"
248                 },
249                 "vlanTransparent": {
250                     "type": "boolean",
251                     "description": "vlan transparent"
252                 },
253                 "shared": {
254                     "type": "boolean",
255                     "description": "network is shared across tenants"
256                 },
257                 "routerExternal": {
258                     "type": "boolean",
259                     "description": "network can provide floating IPs via a router"
260                 }
261             }
262         },
263         "ListVimNetworks": {
264             "type": "object",
265             "properties": {
266                 "name": {
267                     "type": "string",
268                     "description": "network name"
269                 }
270             }
271         },
272         "VimNetworksInfo": {
273             "type": "object",
274             "required": [
275                 "vimId",
276                 "tenantId",
277                 "networks"
278             ],
279             "properties": {
280                 "vimId": {
281                     "type": "string"
282                 },
283                 "vimName": {
284                     "type": "string"
285                 },
286                 "tenantId": {
287                     "type": "string",
288                     "description": "tenant UUID"
289                 },
290                 "networks": {
291                     "type": "array",
292                     "description": "network information",
293                     "items": {
294                        "$ref": "#/definitions/VimNetworkInfo"
295                     }
296                 }
297             }
298         },
299         "VimNetworkInfo": {
300             "type": "object",
301             "required": [
302                 "name",
303                 "status",
304                 "id"
305             ],
306             "properties": {
307                 "name": {
308                     "type": "string",
309                     "description": "network name"
310                 },
311                 "id": {
312                     "type": "string",
313                     "description": "network UUID"
314                 },
315                 "status": {
316                     "type": "string",
317                     "description": "network status"
318                 },
319                 "networkType": {
320                     "type": "string",
321                     "description": "network type"
322                 },
323                 "physicalNetwork": {
324                     "type": "string",
325                     "description": "physical network name"
326                 },
327                 "segmentationId": {
328                     "type": "boolean",
329                     "description": "segmentationId of physical network"
330                 },
331                 "vlanTransparent": {
332                     "type": "boolean",
333                     "description": "vlan transparent"
334                 },
335                 "shared": {
336                     "type": "boolean",
337                     "description": "network is shared across tenants"
338                 },
339                 "routerExternal": {
340                     "type": "boolean",
341                     "description": "network can provide floating IPs via a router"
342                 },
343                 "vimId": {
344                     "type": "string"
345                 },
346                 "vimName": {
347                     "type": "string"
348                 },
349                 "tenantId": {
350                     "type": "string",
351                     "description": "tenant UUID"
352                 },
353                 "returnCode": {
354                     "type": "integer",
355                     "description": "0: Already exist 1: Newly created"
356                 }
357             }
358         }
359     }
360 }