update the namespace for multicloud/framework
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / multivim.flavor.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}/flavors": {
15             "post": {
16                 "tags": [
17                     "vim flavors"
18                 ],
19                 "summary": "create a flavor",
20                 "description": "create a flavor",
21                 "operationId": "create_vim_flavor",
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 flavor request param",
47                         "required": true,
48                         "schema": {
49                             "$ref": "#/definitions/CreateVimFlavor"
50                         }
51                     }
52                 ],
53                 "responses": {
54                     "200": {
55                         "description": "successful operation",
56                         "schema": {
57                             "$ref": "#/definitions/VimFlavorInfo"
58                         }
59                     },
60                     "404": {
61                         "description": "the vim id or tenant UUID is wrong"
62                     },
63                     "500": {
64                         "description": "the vim flavor is not accessable"
65                     }
66                 }
67             },
68             "get": {
69                 "tags": [
70                     "vim flavors"
71                 ],
72                 "summary": "query vim flavors list",
73                 "description": "query vim flavors list",
74                 "operationId": "query_vim_flavors",
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": "flavor name to filter list",
100                         "required": false,
101                         "type": "string"
102                     },
103                     {
104                         "name": "limit",
105                         "in":  "query",
106                         "description": "Requests a page size of items",
107                         "required": false,
108                         "type": "string"
109                     },
110                     {
111                         "name": "marker",
112                         "in":  "query",
113                         "description": "image ID of the last-seen item",
114                         "required": false,
115                         "type": "string"
116                     }
117                 ],
118                 "responses": {
119                     "200": {
120                         "description": "successful operation",
121                         "schema": {
122                             "$ref": "#/definitions/VimFlavorsInfo"
123                         }
124                     },
125                     "404": {
126                         "description": "the vim id or tenant UUID is wrong"
127                     },
128                     "500": {
129                         "description": "the vim flavor is not accessable"
130                     }
131                 }
132             }
133         },
134         "/{vimid}/{tenantid}/flavors/{flavorid}": {
135             "delete": {
136                 "tags": [
137                     "vim flavors"
138                  ],
139                  "summary": "delete specific vim flavor",
140                 "description": "delete specific vim flavor",
141                 "operationId": "delete_vim_flavor",
142                 "consumes": [
143                     "application/json"
144                 ],
145                 "produces": [
146                     "application/json"
147                 ],
148                 "parameters": [
149                     {
150                         "name": "vimid",
151                         "in": "path",
152                         "description": "vim instance id",
153                         "required": true,
154                         "type": "string"
155                     },
156                     {
157                         "name": "tenantid",
158                         "in": "path",
159                         "description": "tenant UUID",
160                         "required": true,
161                         "type": "string"
162                     },
163                     {
164                         "name": "flavorid",
165                         "in": "path",
166                         "description": "vim flavor id",
167                         "required": true,
168                         "type": "string"
169                     }
170                 ],
171                 "responses": {
172                     "204": {
173                         "description": "successful operation"
174                     },
175                     "404": {
176                         "description": "the vim id or tenant UUID is wrong"
177                     },
178                     "500": {
179                         "description": "the vim flavor is not accessable"
180                     }
181                 }
182             },
183             "get": {
184                 "tags": [
185                     "vim flavors"
186                 ],
187                 "summary": "query specific vim flavor",
188                 "description": "query specific vim flavor",
189                 "operationId": "query_vim_flavor",
190                 "consumes": [
191                     "application/json"
192                 ],
193                 "produces": [
194                     "application/json"
195                 ],
196                 "parameters": [
197                     {
198                         "name": "vimid",
199                         "in": "path",
200                         "description": "vim instance id",
201                         "required": true,
202                         "type": "string"
203                     },
204                     {
205                         "name": "tenantid",
206                         "in": "path",
207                         "description": "tenant UUID",
208                         "required": true,
209                         "type": "string"
210                     },
211                     {
212                         "name": "flavorid",
213                         "in": "path",
214                         "description": "vim flavor id",
215                         "required": true,
216                         "type": "string"
217                     }
218                 ],
219                 "responses": {
220                     "200": {
221                         "description": "successful operation",
222                         "schema": {
223                             "$ref": "#/definitions/VimFlavorInfo"
224                         }
225                     },
226                     "404": {
227                         "description": "the vim id or tenant UUID is wrong"
228                     },
229                     "500": {
230                         "description": "the vim flavor is not accessable"
231                     }
232                 }
233             }
234         }
235     },
236     "definitions": {
237         "CreateVimFlavor": {
238             "type": "object",
239             "required": [
240                 "vcpu",
241                 "name",
242                 "memory",
243                 "disk"
244             ],
245             "properties": {
246                 "name": {
247                     "type": "string",
248                     "description": "flavor name"
249                 },
250                 "vcpu": {
251                     "type": "integer",
252                     "description": "virtual cpu number"
253                 },
254                 "memory": {
255                     "type": "integer",
256                     "description": "memory size"
257                 },
258                 "disk": {
259                     "type": "integer",
260                     "description": "The size of the root disk"
261                 },
262                 "ephemeral": {
263                     "type": "integer",
264                     "description": "The size of the ephemeral disk"
265                 },
266                 "swap": {
267                     "type": "integer",
268                     "description": "The size of the swap disk"
269                 },
270                 "isPublic": {
271                     "type": "boolean",
272                     "description": "whether the flavor is public"
273                 },
274                 "extraSpecs": {
275                     "type": "array",
276                     "description": "list of extra specs",
277                     "items": {
278                        "$ref": "#/definitions/VimFlavorExtraSpecInfo"
279                     }
280                 }
281             }
282         },
283         "VimFlavorExtraSpecInfo": {
284             "type": "object",
285             "properties": {
286                 "keyName": {
287                     "type": "string",
288                     "description": "extra spec key"
289                 },
290                 "value": {
291                     "type": "string",
292                     "description": "extra spec value"
293                 }
294             }
295         },
296         "VimFlavorsInfo": {
297             "type": "object",
298             "required": [
299                 "vimId",
300                 "tenantId",
301                 "flavors"
302             ],
303             "properties": {
304                 "vimId": {
305                     "type": "string"
306                 },
307                 "vimName": {
308                     "type": "string"
309                 },
310                 "tenantId": {
311                     "type": "string",
312                     "description": "tenant UUID"
313                 },
314                 "flavors": {
315                     "type": "array",
316                     "description": "flavor list information",
317                     "items": {
318                        "$ref": "#/definitions/VimFlavorInfo"
319                     }
320                 }
321             }
322         },
323         "VimFlavorInfo": {
324             "type": "object",
325             "required": [
326                 "name",
327                 "id",
328                 "vcpu",
329                 "memory",
330                 "disk",
331                 "ephemeral",
332                 "swap",
333                 "isPublic"
334             ],
335             "properties": {
336                 "name": {
337                     "type": "string",
338                     "description": "flavor name"
339                 },
340                 "id": {
341                     "type": "string",
342                     "description": "flavor UUID"
343                 },
344                 "vcpu": {
345                     "type": "integer",
346                     "description": "virtual cpu number"
347                 },
348                 "memory": {
349                     "type": "integer",
350                     "description": "memory size"
351                 },
352                 "disk": {
353                     "type": "integer",
354                     "description": "The size of the root disk"
355                 },
356                 "ephemeral": {
357                     "type": "integer",
358                     "description": "The size of the ephemeral disk"
359                 },
360                 "swap": {
361                     "type": "integer",
362                     "description": "The size of the swap disk"
363                 },
364                 "isPublic": {
365                     "type": "boolean",
366                     "description": "whether the flavor is public"
367                 },
368                 "extraSpecs": {
369                     "type": "array",
370                     "description": "list of extra specs",
371                     "items": {
372                        "$ref": "#/definitions/VimFlavorExtraSpecInfo"
373                     }
374                 },
375                 "vimId": {
376                     "type": "string"
377                 },
378                 "vimName": {
379                     "type": "string"
380                 },
381                 "tenantId": {
382                     "type": "string",
383                     "description": "tenant UUID"
384                 },
385                 "returnCode": {
386                     "type": "integer",
387                     "description": "0: Already exist 1: Newly created"
388                 }
389             }
390         }
391     }
392 }