Add vfc-vnfres get_Cps auto-swagger
[vfc/gvnfm/vnfres.git] / res / res / resources / swagger.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "1.0.0",
5     "title": "ZTE vManager Service rest API"
6   },
7   "host": "10.43.104.27:8000",
8   "basePath": "/api/vnfres/v1",
9   "tags": [
10     {
11       "name": "res Resource"
12     }
13   ],
14   "paths": {
15     "/vnfs/{vnfInstanceId}": {
16       "get": {
17         "tags": [
18           "vnf Resource"
19         ],
20         "summary": "query the single vnf info",
21         "description": "",
22         "operationId": "query_single_vnf",
23         "consumes": [
24           "application/json"
25         ],
26         "produces": [
27           "application/json"
28         ],
29         "parameters": [
30           {
31             "name": "vnfInstanceId",
32             "in": "path",
33             "description": "vnf instance id",
34             "required": true,
35             "type": "string"
36           }
37         ],
38         "responses": {
39           "200": {
40             "description": "successful operation",
41             "schema": {
42               "$ref": "#/definitions/SingleVnfInfo"
43             }
44           },
45           "404": {
46             "description": "the vnf instance id is wrong"
47           },
48           "500": {
49             "description": "the url is invalid"
50           }
51         }
52       }
53     },
54     "/vnfs": {
55       "get": {
56         "tags": [
57           "vnfs Resource"
58         ],
59         "summary": "query the vnfs info",
60         "description": "",
61         "operationId": "query_many_vnf",
62         "consumes": [
63           "application/json"
64         ],
65         "produces": [
66           "application/json"
67         ],
68         "parameters": [
69           {
70             "name": "",
71             "in": "path",
72             "description": "no param",
73             "required": true
74           }
75         ],
76         "responses": {
77           "200": {
78             "description": "successful operation",
79             "schema": {
80               "$ref": "#/definitions/VnfsInfo"
81             }
82           },
83           "404": {
84             "description": "the vnf instance id is wrong"
85           },
86           "500": {
87             "description": "the url is invalid"
88           }
89         }
90       }
91     },
92     "/{vnfInstanceId}/vms": {
93       "get": {
94         "tags": [
95           "vms Resource"
96         ],
97         "summary": "query the specified vm info",
98         "description": "",
99         "operationId": "query_vms",
100         "consumes": [
101           "application/json"
102         ],
103         "produces": [
104           "application/json"
105         ],
106         "parameters": [
107           {
108             "name": "vnfInstanceId",
109             "in": "path",
110             "description": "vnf instance id",
111             "required": true,
112             "type": "string"
113           }
114         ],
115         "responses": {
116           "200": {
117             "description": "successful operation",
118             "schema": {
119               "$ref": "#/definitions/VMInfo"
120             }
121           },
122           "404": {
123             "description": "the vnf instance id is wrong"
124           },
125           "500": {
126             "description": "the url is invalid"
127           }
128         }
129       }
130     },
131     "/{vnfInstanceId}/flavors": {
132       "get": {
133         "tags": [
134           "flavors Resource"
135         ],
136         "summary": "query the specified flavor info",
137         "description": "",
138         "operationId": "query_flavors",
139         "consumes": [
140           "application/json"
141         ],
142         "produces": [
143           "application/json"
144         ],
145         "parameters": [
146           {
147             "name": "vnfInstanceId",
148             "in": "path",
149             "description": "vnf instance id",
150             "required": true,
151             "type": "string"
152           }
153         ],
154         "responses": {
155           "200": {
156             "description": "successful operation",
157             "schema": {
158               "$ref": "#/definitions/FlavorInfo"
159             }
160           },
161           "404": {
162             "description": "the vnf instance id is wrong"
163           },
164           "500": {
165             "description": "the url is invalid"
166           }
167         }
168       }
169     },
170     "/{vnfInstanceId}/networks": {
171       "get": {
172         "tags": [
173           "networks Resource"
174         ],
175         "summary": "query the specified network info",
176         "description": "",
177         "operationId": "query_networks",
178         "consumes": [
179           "application/json"
180         ],
181         "produces": [
182           "application/json"
183         ],
184         "parameters": [
185           {
186             "name": "vnfInstanceId",
187             "in": "path",
188             "description": "vnf instance id",
189             "required": true,
190             "type": "string"
191           }
192         ],
193         "responses": {
194           "200": {
195             "description": "successful operation",
196             "schema": {
197               "$ref": "#/definitions/NetworkInfo"
198             }
199           },
200           "404": {
201             "description": "the vnf instance id is wrong"
202           },
203           "500": {
204             "description": "the url is invalid"
205           }
206         }
207       }
208     },
209     "/{vnfInstanceId}/subnets": {
210       "get": {
211         "tags": [
212           "subnets Resource"
213         ],
214         "summary": "query the specified subnet info",
215         "description": "",
216         "operationId": "query_subnet",
217         "consumes": [
218           "application/json"
219         ],
220         "produces": [
221           "application/json"
222         ],
223         "parameters": [
224           {
225             "name": "vnfInstanceId",
226             "in": "path",
227             "description": "vnf instance id",
228             "required": true,
229             "type": "string"
230           }
231         ],
232         "responses": {
233           "200": {
234             "description": "successful operation",
235             "schema": {
236               "$ref": "#/definitions/SubnetInfo"
237             }
238           },
239           "404": {
240             "description": "the vnf instance id is wrong"
241           },
242           "500": {
243             "description": "the url is invalid"
244           }
245         }
246       }
247     },
248     "/{vnfInstanceId}/cps": {
249       "get": {
250         "tags": [
251           "sps Resource"
252         ],
253         "summary": "query the specified cp info",
254         "description": "",
255         "operationId": "query_cp",
256         "consumes": [
257           "application/json"
258         ],
259         "produces": [
260           "application/json"
261         ],
262         "parameters": [
263           {
264             "name": "vnfInstanceId",
265             "in": "path",
266             "description": "vnf instance id",
267             "required": true,
268             "type": "string"
269           }
270         ],
271         "responses": {
272           "200": {
273             "description": "successful operation",
274             "schema": {
275               "$ref": "#/definitions/CpInfo"
276             }
277           },
278           "404": {
279             "description": "the vnf instance id is wrong"
280           },
281           "500": {
282             "description": "the url is invalid"
283           }
284         }
285       }
286     },
287     "/{vnfInstanceId}/volumes": {
288       "get": {
289         "tags": [
290           "sps Resource"
291         ],
292         "summary": "query the specified volumes info",
293         "description": "",
294         "operationId": "query_volumes",
295         "consumes": [
296           "application/json"
297         ],
298         "produces": [
299           "application/json"
300         ],
301         "parameters": [
302           {
303             "name": "vnfInstanceId",
304             "in": "path",
305             "description": "vnf instance id",
306             "required": true,
307             "type": "string"
308           }
309         ],
310         "responses": {
311           "200": {
312             "description": "successful operation",
313             "schema": {
314               "$ref": "#/definitions/VolumesInfo"
315             }
316           },
317           "404": {
318             "description": "the vnf instance id is wrong"
319           },
320           "500": {
321             "description": "the url is invalid"
322           }
323         }
324       }
325     }
326   },
327   "definitions": {
328     "SingleVnfInfo": {
329       "type": "object",
330       "properties": {
331         "vnfInstanceId": {
332           "type": "string"
333         },
334         "vnfInstanceName": {
335           "type": "string"
336         },
337         "vnfInstanceDescription": {
338           "type": "string"
339         },
340         "onboardedVnfPkgInfoId": {
341           "type": "string"
342         },
343         "vnfdId": {
344           "type": "string"
345         },
346         "vnfdVersion": {
347           "type": "string"
348         },
349         "vnfSoftwareVersion": {
350           "type": "string"
351         },
352         "vnfProvider": {
353           "type": "string"
354         },
355         "vnfProductName": {
356           "type": "string"
357         },
358         "vnfConfigurableProperties": {
359           "type": "object"
360         },
361         "instantiationState": {
362           "type": "string"
363         },
364         "instantiatedVnfInfo": {
365           "type": "object",
366           "properties": {
367             "flavourId": {
368               "type": "string"
369             },
370             "vnfState": {
371               "type": "string"
372             },
373             "scaleStatus": {
374               "type": "array",
375               "items": {
376                 "type": "object"
377               }
378             },
379             "extCpInfo": {
380               "type": "array",
381               "items": {
382                 "type": "object"
383               }
384             },
385             "extVirtualLink": {
386               "type": "array",
387               "items": {
388                 "type": "object"
389               }
390             },
391             "monitoringParameters": {
392               "type": "object"
393             },
394             "localizationLanguage": {
395               "type": "string"
396             },
397             "vimInfo": {
398               "type": "array",
399               "items": {
400                 "type": "object"
401               }
402             },
403             "vnfcResourceInfo": {
404               "type": "array",
405               "items": {
406                 "type": "object"
407               }
408             },
409             "virtualLinkResourceInfo": {
410               "type": "array",
411               "items": {
412                 "type": "object"
413               }
414             },
415             "virtualStorageResourceInfo": {
416               "type": "array",
417               "items": {
418                 "type": "object"
419               }
420             }
421           }
422         },
423         "metadata": {
424           "type": "object"
425         },
426         "extensions": {
427           "type": "object"
428         }
429       }
430     },
431     "VnfsInfo": {
432       "type": "array",
433       "items": {
434         "type": "SingleVnfInfo"
435       }
436     },
437     "VMInfo": {
438       "type": "array",
439       "items": {
440         "type": "object",
441         "properties": {
442           "vmid": {
443             "type": "string"
444           },
445           "vimid": {
446             "type": "string"
447           },
448           "resouceid": {
449             "type": "string"
450           },
451           "insttype": {
452             "type": "integer"
453           },
454           "instid": {
455             "type": "string"
456           },
457           "vmname": {
458             "type": "string"
459           },
460           "operationalstate": {
461             "type": "string"
462           },
463           "availability_zone": {
464             "type": "string"
465           },
466           "tenant": {
467             "type": "string"
468           },
469           "nodeId": {
470             "type": "string"
471           },
472           "metadata": {
473             "type": "string"
474           },
475           "is_predefined": {
476             "type": "integer"
477           }
478         }
479       }
480     },
481     "FlavorInfo": {
482       "type": "array",
483       "items": {
484         "type": "object",
485         "properties": {
486           "flavourid": {
487             "type": "string"
488           },
489           "name": {
490             "type": "string"
491           },
492           "vcpu": {
493             "type": "integer"
494           },
495           "memory": {
496             "type": "integer"
497           },
498           "extraspecs": {
499             "type": "string"
500           },
501           "instid": {
502             "type": "string"
503           },
504           "tenant": {
505             "type": "string"
506           },
507           "vimid": {
508             "type": "string"
509           },
510           "create_time": {
511             "type": "string"
512           }
513         }
514       }
515     },
516     "NetworkInfo": {
517       "type": "array",
518       "items": {
519         "type": "object",
520         "properties": {
521           "networkid": {
522             "type": "string"
523           },
524           "vimid": {
525             "type": "string"
526           },
527           "resouceid": {
528             "type": "string"
529           },
530           "insttype": {
531             "type": "integer"
532           },
533           "instid": {
534             "type": "string"
535           },
536           "name": {
537             "type": "string"
538           }
539         }
540       }
541     },
542     "SubnetInfo": {
543       "type": "array",
544       "items": {
545         "type": "object",
546         "properties": {
547           "subnetworkid": {
548             "type": "string"
549           },
550           "networkid": {
551             "type": "string"
552           },
553           "vimid": {
554             "type": "string"
555           },
556           "resouceid": {
557             "type": "string"
558           },
559           "insttype": {
560             "type": "integer"
561           },
562           "instid": {
563             "type": "string"
564           },
565           "name": {
566             "type": "string"
567           },
568           "cidr": {
569             "type": "string"
570           }
571         }
572       }
573     },
574     "CpInfo": {
575       "type": "array",
576       "items": {
577         "type": "object",
578         "properties": {
579           "cpinstanceid": {
580             "type": "string"
581           },
582           "cpdid": {
583             "type": "string"
584           },
585           "cpinstancename": {
586             "type": "string"
587           },
588           "vlinstanceid": {
589             "type": "string"
590           },
591           "ownertype": {
592             "type": "integer"
593           },
594           "ownerid": {
595             "type": "string"
596           },
597           "relatedtype": {
598             "type": "integer"
599           }
600         }
601       }
602     },
603     "VolumesInfo": {
604       "type": "array",
605       "items": {
606         "type": "object",
607         "properties": {
608           "storageid": {
609             "type": "string"
610           },
611           "vimid": {
612             "type": "string"
613           },
614           "resouceid": {
615             "type": "string"
616           },
617           "insttype": {
618             "type": "integer"
619           },
620           "instid": {
621             "type": "string"
622           },
623           "storagetype": {
624             "type": "string"
625           },
626           "size": {
627             "type": "string"
628           }
629         }
630       }
631     }
632   }
633 }