update the namespace for multicloud/framework
[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": "/api/multicloud/v0/",
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                         "name": "name",
98                         "in":  "query",
99                         "description": "network name to filter list",
100                         "required": false,
101                         "type": "string"
102                     }
103                 ],
104                 "responses": {
105                     "200": {
106                         "description": "successful operation",
107                         "schema": {
108                             "$ref": "#/definitions/VimNetworksInfo"
109                         }
110                     },
111                     "404": {
112                         "description": "the vim id or tenant UUID is wrong"
113                     },
114                     "500": {
115                         "description": "the vim network is not accessable"
116                     }
117                 }
118             }
119         },
120         "/{vimid}/{tenantid}/networks/{networkid}": {
121             "delete": {
122                 "tags": [
123                     "vim networks"
124                  ],
125                  "summary": "delete specific vim network",
126                 "description": "delete specific vim network",
127                 "operationId": "delete_vim_network",
128                 "consumes": [
129                     "application/json"
130                 ],
131                 "produces": [
132                     "application/json"
133                 ],
134                 "parameters": [
135                     {
136                         "name": "vimid",
137                         "in": "path",
138                         "description": "vim instance id",
139                         "required": true,
140                         "type": "string"
141                     },
142                     {
143                         "name": "tenantid",
144                         "in": "path",
145                         "description": "tenant UUID",
146                         "required": true,
147                         "type": "string"
148                     },
149                     {
150                         "name": "networkid",
151                         "in": "path",
152                         "description": "vim network id",
153                         "required": true,
154                         "type": "string"
155                     }
156                 ],
157                 "responses": {
158                     "204": {
159                         "description": "successful operation"
160                     },
161                     "404": {
162                         "description": "the vim id or tenant UUID is wrong"
163                     },
164                     "500": {
165                         "description": "the network is not accessable"
166                     }
167                 }
168             },
169             "get": {
170                 "tags": [
171                     "vim networks"
172                 ],
173                 "summary": "query specific vim network",
174                 "description": "query specific vim network",
175                 "operationId": "query_vim_network",
176                 "consumes": [
177                     "application/json"
178                 ],
179                 "produces": [
180                     "application/json"
181                 ],
182                 "parameters": [
183                     {
184                         "name": "vimid",
185                         "in": "path",
186                         "description": "vim instance id",
187                         "required": true,
188                         "type": "string"
189                     },
190                     {
191                         "name": "tenantid",
192                         "in": "path",
193                         "description": "tenant UUID",
194                         "required": true,
195                         "type": "string"
196                     },
197                     {
198                         "name": "networkid",
199                         "in": "path",
200                         "description": "vim network id",
201                         "required": true,
202                         "type": "string"
203                     }
204                 ],
205                 "responses": {
206                     "200": {
207                         "description": "successful operation",
208                         "schema": {
209                             "$ref": "#/definitions/VimNetworkInfo"
210                         }
211                     },
212                     "404": {
213                         "description": "the vim id or tenant UUID is wrong"
214                     },
215                     "500": {
216                         "description": "the vim network is not accessable"
217                     }
218                 }
219             }
220         }
221     },
222     "definitions": {
223         "CreateVimNetwork": {
224             "type": "object",
225             "required": [
226                 "networkType",
227                 "name",
228                 "shared"
229             ],
230             "properties": {
231                 "name": {
232                     "type": "string",
233                     "description": "network name"
234                 },
235                 "networkType": {
236                     "type": "string",
237                     "description": "network type"
238                 },
239                 "physicalNetwork": {
240                     "type": "string",
241                     "description": "physical network name"
242                 },
243                 "segmentationId": {
244                     "type": "integer",
245                     "description": "segmentation ID of physical network"
246                 },
247                 "vlanTransparent": {
248                     "type": "boolean",
249                     "description": "vlan transparent"
250                 },
251                 "shared": {
252                     "type": "boolean",
253                     "description": "network is shared across tenants"
254                 },
255                 "routerExternal": {
256                     "type": "boolean",
257                     "description": "network can provide floating IPs via a router"
258                 }
259             }
260         },
261         "VimNetworksInfo": {
262             "type": "object",
263             "required": [
264                 "vimId",
265                 "tenantId",
266                 "networks"
267             ],
268             "properties": {
269                 "vimId": {
270                     "type": "string"
271                 },
272                 "vimName": {
273                     "type": "string"
274                 },
275                 "tenantId": {
276                     "type": "string",
277                     "description": "tenant UUID"
278                 },
279                 "networks": {
280                     "type": "array",
281                     "description": "network information",
282                     "items": {
283                        "$ref": "#/definitions/VimNetworkInfo"
284                     }
285                 }
286             }
287         },
288         "VimNetworkInfo": {
289             "type": "object",
290             "required": [
291                 "name",
292                 "status",
293                 "id"
294             ],
295             "properties": {
296                 "name": {
297                     "type": "string",
298                     "description": "network name"
299                 },
300                 "id": {
301                     "type": "string",
302                     "description": "network UUID"
303                 },
304                 "status": {
305                     "type": "string",
306                     "description": "network status"
307                 },
308                 "networkType": {
309                     "type": "string",
310                     "description": "network type"
311                 },
312                 "physicalNetwork": {
313                     "type": "string",
314                     "description": "physical network name"
315                 },
316                 "segmentationId": {
317                     "type": "boolean",
318                     "description": "segmentationId of physical network"
319                 },
320                 "vlanTransparent": {
321                     "type": "boolean",
322                     "description": "vlan transparent"
323                 },
324                 "shared": {
325                     "type": "boolean",
326                     "description": "network is shared across tenants"
327                 },
328                 "routerExternal": {
329                     "type": "boolean",
330                     "description": "network can provide floating IPs via a router"
331                 },
332                 "vimId": {
333                     "type": "string"
334                 },
335                 "vimName": {
336                     "type": "string"
337                 },
338                 "tenantId": {
339                     "type": "string",
340                     "description": "tenant UUID"
341                 },
342                 "returnCode": {
343                     "type": "integer",
344                     "description": "0: Already exist 1: Newly created"
345                 }
346             }
347         }
348     }
349 }