Fix docker build error problem
[vfc/nfvo/driver/vnfm/svnfm.git] / zte / vmanager / driver / swagger / swagger.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "1.0.0",
5     "title": "ZTE VNFM Driver Service rest API"
6   },
7   "basePath": "/api/ztevnfmdriver/v1",
8   "tags": [
9     {
10       "name": "ztevnfmdriver"
11     }
12   ],
13   "paths": {
14     "/{vnfmid}/vnfs": {
15       "post": {
16         "tags": [
17           "vnf instantiate"
18         ],
19         "summary": "instantiate the vnf",
20         "description": "",
21         "operationId": "instantiate_vnf",
22         "consumes": [
23           "application/json"
24         ],
25         "produces": [
26           "application/json"
27         ],
28         "parameters": [
29           {
30             "name": "vnfmid",
31             "in": "path",
32             "description": "vnfm instance id",
33             "required": true,
34             "type": "string"
35           },
36           {
37             "name": "body",
38             "in": "body",
39             "description": "request parameters",
40             "required": true,
41             "schema": {
42               "$ref": "#/definitions/VnfRequestParams"
43             }
44           }
45         ],
46         "responses": {
47           "200": {
48             "description": "successful operation",
49             "schema": {
50               "$ref": "#/definitions/VnfResult"
51             }
52           },
53           "404": {
54             "description": "the vnfm instance id is wrong"
55           },
56           "500": {
57             "description": "the url is invalid"
58           }
59         }
60       }
61     },
62     "/{vnfmid}/vnfs/{vnfInstanceId}/terminate": {
63       "post": {
64         "tags": [
65           "vnf terminate"
66         ],
67         "summary": "terminate the vnf",
68         "description": "",
69         "operationId": "terminate_vnf",
70         "consumes": [
71           "application/json"
72         ],
73         "produces": [
74           "application/json"
75         ],
76         "parameters": [
77           {
78             "name": "vnfmid",
79             "in": "path",
80             "description": "vnfm instance id",
81             "required": true,
82             "type": "string"
83           },
84           {
85             "name": "vnfInstanceId",
86             "in": "path",
87             "description": "vnf instance id",
88             "required": true,
89             "type": "string"
90           }
91         ],
92         "responses": {
93           "200": {
94             "description": "successful operation",
95             "schema": {
96               "$ref": "#/definitions/VnfResult"
97             }
98           },
99           "404": {
100             "description": "the vnfmid and vnfInstanceId  are wrong"
101           },
102           "500": {
103             "description": "the url is invalid"
104           }
105         }
106       }
107     },
108     "/{vnfmid}/vnfs/{vnfInstanceId}": {
109       "get": {
110         "tags": [
111           "query vnf"
112         ],
113         "summary": "query the vnf",
114         "description": "",
115         "operationId": "query_vnf",
116         "consumes": [
117           "application/json"
118         ],
119         "produces": [
120           "application/json"
121         ],
122         "parameters": [
123           {
124             "name": "vnfmid",
125             "in": "path",
126             "description": "vnfm instance id",
127             "required": true,
128             "type": "string"
129           },
130           {
131             "name": "vnfInstanceId",
132             "in": "path",
133             "description": "vnf instance id",
134             "required": true,
135             "type": "string"
136           }
137         ],
138         "responses": {
139           "200": {
140             "description": "successful operation",
141             "schema": {
142               "$ref": "#/definitions/returnVnfInfo"
143             }
144           },
145           "404": {
146             "description": "the vnfmid and vnfInstanceId  are wrong"
147           },
148           "500": {
149             "description": "the url is invalid"
150           }
151         }
152       }
153     },
154     "/{vnfmid}/jobs/{jobid}": {
155       "get": {
156         "tags": [
157           "operation status"
158         ],
159         "summary": "operation status",
160         "description": "",
161         "operationId": "operation_status",
162         "consumes": [
163           "application/json"
164         ],
165         "produces": [
166           "application/json"
167         ],
168         "parameters": [
169           {
170             "name": "vnfmid",
171             "in": "path",
172             "description": "vnfm instance id",
173             "required": true,
174             "type": "string"
175           },
176           {
177             "name": "jobid",
178             "in": "path",
179             "description": "vnf job id",
180             "required": true,
181             "type": "string"
182           },
183           {
184             "name": "responseId",
185             "in": "path",
186             "description": "vnf response id",
187             "required": true,
188             "type": "integer"
189           }
190         ],
191         "responses": {
192           "200": {
193             "description": "successful operation",
194             "schema": {
195               "$ref": "#/definitions/OperationStatusInfo"
196             }
197           },
198           "404": {
199             "description": "the vnfmid ,jobid and responseId are wrong"
200           },
201           "500": {
202             "description": "the url is invalid"
203           }
204         }
205       }
206     },
207     "/resource/grant": {
208       "put": {
209         "tags": [
210           "grant vnf"
211         ],
212         "summary": "grant the vnf",
213         "description": "",
214         "operationId": "grant_vnf",
215         "consumes": [
216           "application/json"
217         ],
218         "produces": [
219           "application/json"
220         ],
221         "parameters": [
222           {
223             "name": "body",
224             "in": "body",
225             "description": "request data for grant the vnf",
226             "required": true,
227             "schema": {
228               "$ref": "#/definitions/RequestGrantParams"
229             }
230           }
231         ],
232         "responses": {
233           "201": {
234             "description": "successful grant",
235             "schema": {
236               "$ref": "#/definitions/responseGrantResult"
237             }
238           },
239           "404": {
240             "description": "the request body is wrong"
241           },
242           "500": {
243             "description": "the url is invalid"
244           }
245         }
246       }
247     },
248     "/vnfs/lifecyclechangesnotification": {
249       "post": {
250         "tags": [
251           "life cycle changes notification"
252         ],
253         "summary": "life cycle changes notification",
254         "description": "",
255         "operationId": "lifecyclechangesnotification",
256         "consumes": [
257           "application/json"
258         ],
259         "produces": [
260           "application/json"
261         ],
262         "parameters": [
263           {
264             "name": "body",
265             "in": "body",
266             "description": "request data for grant the vnf",
267             "required": true,
268             "schema": {
269               "$ref": "#/definitions/RequestNotifyParams"
270             }
271           }
272         ],
273         "responses": {
274           "201": {
275             "description": "successful Notify",
276             "schema": {
277               "$ref": "#/definitions/ResponseNotifyResult"
278             }
279           },
280           "404": {
281             "description": "the request body is wrong"
282           },
283           "500": {
284             "description": "the url is invalid"
285           }
286         }
287       }
288     },
289     "/{vnfmid}/vnfs/{nfInstanceId}/scale": {
290       "post": {
291         "tags": [
292           "scale vnf"
293         ],
294         "summary": "scale vnf",
295         "description": "",
296         "operationId": "scale_vnf",
297         "consumes": [
298           "application/json"
299         ],
300         "produces": [
301           "application/json"
302         ],
303         "parameters": [
304           {
305             "name": "vnfmid",
306             "in": "path",
307             "description": "vnfm instance id",
308             "required": true,
309             "type": "string"
310           },
311           {
312             "name": "nfInstanceId",
313             "in": "path",
314             "description": "nf instance id",
315             "required": true,
316             "type": "string"
317           },
318           {
319             "name": "body",
320             "in": "body",
321             "description": "request data for grant the vnf",
322             "required": true,
323             "schema": {
324               "$ref": "#/definitions/RequestScaleParams"
325             }
326           }
327         ],
328         "responses": {
329           "201": {
330             "description": "successful scale",
331             "schema": {
332               "$ref": "#/definitions/ResponseScaleResult"
333             }
334           },
335           "404": {
336             "description": "the request body is wrong"
337           },
338           "500": {
339             "description": "the url is invalid"
340           }
341         }
342       }
343     }
344   },
345   "definitions": {
346     "VnfRequestParams": {
347       "type": "object",
348       "properties": {
349         "vnfInstanceName": {
350           "type": "string"
351         },
352         "vnfPackageId": {
353           "type": "string"
354         },
355         "vnfDescriptorId": {
356           "type": "string"
357         },
358         "additionalParam": {
359           "type": "object",
360           "properties": {
361             "sdncontroller": {
362               "type": "string"
363             },
364             "NatIpRange": {
365               "type": "string"
366             },
367             "m6000_mng_ip": {
368               "type": "string"
369             },
370             "externalPluginManageNetworkName": {
371               "type": "string"
372             },
373             "location": {
374               "type": "string"
375             },
376             "externalManageNetworkName": {
377               "type": "string"
378             },
379             "sfc_data_network": {
380               "type": "string"
381             },
382             "externalDataNetworkName": {
383               "type": "string"
384             },
385             "inputs": {
386               "type": "object"
387             }
388           }
389         }
390       }
391     },
392     "VnfResult": {
393       "type": "object",
394       "properties": {
395         "vnfInstanceId": {
396           "type": "string"
397         },
398         "jobId": {
399           "type": "string"
400         }
401       }
402     },
403     "returnVnfInfo": {
404       "type": "object",
405       "properties": {
406         "vnfInfo": {
407           "type": "object",
408           "properties": {
409             "vnfStatus": {
410               "type": "string"
411             }
412           }
413         }
414       }
415     },
416     "OperationStatusInfo": {
417       "type": "object",
418       "properties": {
419         "responsedescriptor": {
420           "type": "object",
421           "properties": {
422             "status": {
423               "type": "string"
424             },
425             "responsehistorylist": {
426               "type": "string"
427             },
428             "responseid": {
429               "type": "integer"
430             },
431             "errorcode": {
432               "type": "string"
433             },
434             "progress": {
435               "type": "integer"
436             },
437             "statusdescription": {
438               "type": "string"
439             }
440           }
441         },
442         "jobid": {
443           "type": "string"
444         }
445       }
446     },
447     "RequestGrantParams": {
448       "type": "object",
449       "properties": {
450         "vnfmid": {
451           "type": "string"
452         },
453         "nfvoid": {
454           "type": "string"
455         },
456         "vimid": {
457           "type": "string"
458         },
459         "exvimidlist": {
460           "type": "string"
461         },
462         "tenant": {
463           "type": "string"
464         },
465         "vnfistanceid": {
466           "type": "string"
467         },
468         "operationright": {
469           "type": "string"
470         },
471         "vmlist": {
472           "type": "string"
473         }
474       }
475     },
476     "responseGrantResult": {
477       "type": "object",
478       "properties": {
479         "vimid": {
480           "type": "string"
481         },
482         "tenant": {
483           "type": "string"
484         }
485       }
486     },
487     "RequestNotifyParams": {
488       "type": "object",
489       "properties": {
490         "nfvoid": {
491           "type": "string"
492         },
493         "vnfmid": {
494           "type": "string"
495         },
496         "vimid": {
497           "type": "string"
498         },
499         "timestamp": {
500           "type": "string"
501         },
502         "vnfinstanceid": {
503           "type": "string"
504         },
505         "eventtype": {
506           "type": "string"
507         },
508         "vmlist": {
509           "type": "string"
510         }
511       }
512     },
513     "ResponseNotifyResult": {
514       "type": "object"
515     },
516     "RequestScaleParams": {
517       "type": "object",
518       "properties": {
519         "type": {
520           "type": "string"
521         },
522         "aspectId": {
523           "type": "string"
524         },
525         "numberOfSteps": {
526           "type": "string"
527         },
528         "additionalParam": {
529           "type": "object"
530         }
531       }
532     },
533     "ResponseScaleResult": {
534       "type": "object",
535       "properties": {
536         "jobid": {
537           "type": "string"
538         },
539         "nfInstanceId": {
540           "type": "string"
541         }
542       }
543     }
544   }
545 }