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