Fix VFC swagger bug
[vfc/nfvo/lcm.git] / lcm / swagger / vfc.nslcm.swagger.json
1 {\r
2   "swagger": "2.0",\r
3   "info": {\r
4     "version": "1.0.0",\r
5     "title": "ONAP VFC Network Service Lifecycle Management API",\r
6     "description": "VFC Network Service Lifecycle Management Rest API.",\r
7     "contact": {\r
8       "name": "ONAP VFC team",\r
9       "email": "onap-discuss@lists.onap.org",\r
10       "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/lcm"\r
11     }\r
12   },\r
13   "basePath": "/api/nslcm/v1",\r
14   "schemes": [\r
15     "http",\r
16     "https"\r
17   ],\r
18   "consumes": [\r
19     "application/json"\r
20   ],\r
21   "produces": [\r
22     "application/json"\r
23   ],\r
24   "paths": {\r
25     "/ns": {\r
26       "post": {\r
27         "tags": [\r
28           "ns"\r
29         ],\r
30         "summary": "ns create",\r
31         "description": "ns create",\r
32         "operationId": "ns_create",\r
33         "parameters": [\r
34           {\r
35             "in": "body",\r
36             "name": "NSCreateRequest",\r
37             "description": "NS Instance Create Request",\r
38             "required": true,\r
39             "schema": {\r
40               "$ref": "#/definitions/NsCreateRequest"\r
41             }\r
42           }\r
43         ],\r
44         "responses": {\r
45           "200": {\r
46             "description": "successful operation",\r
47             "schema": {\r
48               "$ref": "#/definitions/NsCreateResponse"\r
49             }\r
50           }\r
51         }\r
52       },\r
53       "get": {\r
54         "tags": [\r
55           "ns"\r
56         ],\r
57         "summary": "ns get",\r
58         "description": "ns get",\r
59         "operationId": "ns_get",\r
60         "parameters": [],\r
61         "responses": {\r
62           "200": {\r
63             "description": "successful operation",\r
64             "schema": {\r
65               "$ref": "#/definitions/NsInfo"\r
66             }\r
67           }\r
68         }\r
69       }\r
70     },\r
71     "/ns/{nsInstanceId}/Instantiate": {\r
72       "post": {\r
73         "tags": [\r
74           "ns"\r
75         ],\r
76         "summary": "ns Instantiate",\r
77         "description": "ns Instantiate",\r
78         "operationId": "ns_Instantiate",\r
79         "parameters": [\r
80           {\r
81             "required": true,\r
82             "type": "string",\r
83             "description": "",\r
84             "name": "nsInstanceId",\r
85             "in": "path"\r
86           },\r
87           {\r
88             "in": "body",\r
89             "name": "NSInstantiateRequest",\r
90             "description": "NS Instantiate Request Body",\r
91             "required": true,\r
92             "schema": {\r
93               "$ref": "#/definitions/NsInstantiateRequest"\r
94             }\r
95           }\r
96         ],\r
97         "responses": {\r
98           "200": {\r
99             "description": "",\r
100             "schema": {\r
101               "$ref": "#/definitions/JobInfo"\r
102             }\r
103           },\r
104           "201": {\r
105             "description": "Invalid Request"\r
106           }\r
107         }\r
108       }\r
109     },\r
110     "/ns/{nsInstanceId}/scale": {\r
111       "post": {\r
112         "tags": [\r
113           "ns"\r
114         ],\r
115         "summary": "ns scale",\r
116         "description": "ns scale",\r
117         "operationId": "ns_scale",\r
118         "parameters": [\r
119           {\r
120             "required": true,\r
121             "type": "string",\r
122             "description": "",\r
123             "name": "nsInstanceId",\r
124             "in": "path"\r
125           },\r
126           {\r
127             "in": "body",\r
128             "name": "ScaleNSRequest",\r
129             "description": "Scale NS Request Body",\r
130             "required": true,\r
131             "schema": {\r
132               "$ref": "#/definitions/NsScaleRequest"\r
133             }\r
134           }\r
135         ],\r
136         "responses": {\r
137           "200": {\r
138             "description": "",\r
139             "schema": {\r
140               "$ref": "#/definitions/JobInfo"\r
141             }\r
142           },\r
143           "201": {\r
144             "description": "Invalid Request"\r
145           }\r
146         }\r
147       }\r
148     },\r
149     "/ns/{ns_instance_id}/heal": {\r
150       "post": {\r
151         "tags": [\r
152           "ns"\r
153         ],\r
154         "summary": "ns heal",\r
155         "description": "ns heal",\r
156         "operationId": "ns_heal",\r
157         "parameters": [\r
158           {\r
159             "required": true,\r
160             "type": "string",\r
161             "description": "Identifier of the NS instance.",\r
162             "name": "ns_instance_id",\r
163             "in": "path"\r
164           },\r
165           {\r
166             "in": "body",\r
167             "name": "healVnfData",\r
168             "description": "healVnfData",\r
169             "required": true,\r
170             "schema": {\r
171               "$ref": "#/definitions/NsHealRequest"\r
172             }\r
173           }\r
174         ],\r
175         "responses": {\r
176           "202": {\r
177             "description": "",\r
178             "schema": {\r
179               "$ref": "#/definitions/JobInfo"\r
180             }\r
181           },\r
182           "500": {\r
183             "description": "the url is invalid"\r
184           }\r
185         }\r
186       }\r
187     },\r
188     "/ns/{ns_instance_id}/terminate": {\r
189       "post": {\r
190         "tags": [\r
191           "ns"\r
192         ],\r
193         "summary": "ns terminate",\r
194         "description": "ns terminate",\r
195         "operationId": "ns_terminate",\r
196         "parameters": [\r
197           {\r
198             "required": true,\r
199             "type": "string",\r
200             "description": "Identifier of the NS instance.",\r
201             "name": "ns_instance_id",\r
202             "in": "path"\r
203           },\r
204           {\r
205             "in": "body",\r
206             "name": "NsTerminateRequest",\r
207             "description": "NsTerminateRequest",\r
208             "required": true,\r
209             "schema": {\r
210               "$ref": "#/definitions/NsTerminateRequest"\r
211             }\r
212           }\r
213         ],\r
214         "responses": {\r
215           "202": {\r
216             "description": "",\r
217             "schema": {\r
218               "$ref": "#/definitions/JobInfo"\r
219             }\r
220           },\r
221           "500": {\r
222             "description": "the url is invalid"\r
223           }\r
224         }\r
225       }\r
226     },\r
227     "/ns/{ns_instance_id}": {\r
228       "delete": {\r
229         "tags": [\r
230           "ns"\r
231         ],\r
232         "summary": "ns delete",\r
233         "description": "ns delete",\r
234         "operationId": "ns_delete",\r
235         "parameters": [\r
236           {\r
237             "required": true,\r
238             "type": "string",\r
239             "description": "Identifier of the NS instance.",\r
240             "name": "ns_instance_id",\r
241             "in": "path"\r
242           }\r
243         ],\r
244         "responses": {\r
245           "204": {\r
246             "description": "The NS instance resource and the associated NS identifier were deleted successfully."\r
247           }\r
248         }\r
249       }\r
250     },\r
251     "/jobs/{jobId}": {\r
252       "get": {\r
253         "tags": [\r
254           "job"\r
255         ],\r
256         "summary": "jobstatus",\r
257         "description": "",\r
258         "operationId": "get_jobstatus",\r
259         "parameters": [\r
260           {\r
261             "required": true,\r
262             "type": "string",\r
263             "description": "job Id",\r
264             "name": "jobId",\r
265             "in": "path"\r
266           },\r
267           {\r
268             "required": true,\r
269             "type": "string",\r
270             "description": "job response message id",\r
271             "name": "responseId",\r
272             "in": "query"\r
273           }\r
274         ],\r
275         "responses": {\r
276           "202": {\r
277             "description": "",\r
278              "schema": {\r
279               "$ref": "#/definitions/JobDetailInfo"\r
280             }\r
281           }\r
282         }\r
283       }\r
284     }\r
285   },\r
286   "definitions": {\r
287     "NsCreateRequest": {\r
288       "type": "object",\r
289       "properties": {\r
290         "csarId": {\r
291           "type": "string",\r
292           "description": "the NS package ID"\r
293         },\r
294         "nsName": {\r
295           "type": "string"\r
296         },\r
297         "description": {\r
298           "type": "string"\r
299         }\r
300       }\r
301     },\r
302     "NsCreateResponse": {\r
303       "type": "object",\r
304       "properties": {\r
305         "nsInstanceId": {\r
306           "type": "string"\r
307         }\r
308       }\r
309     },\r
310     "NsInstantiateRequest": {\r
311       "type": "object",\r
312       "properties": {\r
313         "LocationConstraints": {\r
314           "type": "array",\r
315           "items": {\r
316             "$ref": "#/definitions/LocationConstraint"\r
317           }\r
318         },\r
319         "additionalParamForNs": {\r
320           "type": "string"\r
321         }\r
322       }\r
323     },\r
324     "LocationConstraint": {\r
325       "type": "object",\r
326       "properties": {\r
327         "vnfProfileId": {\r
328           "type": "string"\r
329         },\r
330         "locationConstraints": {\r
331           "type": "object",\r
332           "properties": {\r
333             "vimid": {\r
334               "type": "string"\r
335             }\r
336           }\r
337         }\r
338       }\r
339     },\r
340     "NsScaleRequest": {\r
341       "type": "object",\r
342       "properties": {\r
343         "scaleType": {\r
344           "type": "string"\r
345         },\r
346         "scaleNsByStepsData": {\r
347           "$ref": "#/definitions/NsScaleByStepsData"\r
348         }\r
349       }\r
350     },\r
351     "NsScaleByStepsData": {\r
352       "type": "object",\r
353       "properties": {\r
354         "scalingDirection": {\r
355           "type": "string"\r
356         },\r
357         "aspectId": {\r
358           "type": "string"\r
359         },\r
360         "numberOfSteps": {\r
361           "type": "integer"\r
362         }\r
363       }\r
364     },\r
365     "NsHealRequest": {\r
366       "type": "object",\r
367       "properties": {\r
368         "vnfInstanceId": {\r
369           "type": "string"\r
370         },\r
371         "cause": {\r
372           "type": "string"\r
373         },\r
374         "additionalParams": {\r
375           "type": "object",\r
376           "properties": {\r
377             "action": {\r
378               "type": "string"\r
379             },\r
380             "actionvminfo": {\r
381               "type": "object",\r
382               "properties": {\r
383                 "vmid": {\r
384                   "type": "string"\r
385                 },\r
386                 "vmname": {\r
387                   "type": "string"\r
388                 }\r
389               }\r
390             }\r
391           }\r
392         }\r
393       }\r
394     },\r
395     "NsTerminateRequest": {\r
396       "type": "object",\r
397       "properties": {\r
398         "terminationType": {\r
399           "type": "string"\r
400         },\r
401         "gracefulTerminationTimeout": {\r
402           "type": "string"\r
403         }\r
404       }\r
405     },\r
406     "JobInfo": {\r
407       "type": "object",\r
408       "properties": {\r
409         "jobId": {\r
410           "type": "string"\r
411         }\r
412       }\r
413     },\r
414    \r
415     "NsInfo": {\r
416       "type": "object",\r
417       "properties": {\r
418         "nsInstanceId": {\r
419           "type": "string"\r
420         },\r
421         "nsName": {\r
422           "type": "string"\r
423         },\r
424         "description": {\r
425           "type": "string"\r
426         },\r
427         "nsdId": {\r
428           "type": "string"\r
429         },\r
430         "vnfInfo": {\r
431           "type": "array",\r
432           "items": {\r
433             "$ref": "#/definitions/vnfInfo"\r
434           }\r
435         },\r
436         "vlInfo": {\r
437           "type": "array",\r
438           "items": {\r
439             "$ref": "#/definitions/vlInfo"\r
440           }\r
441         },\r
442         "vnffgInfo": {\r
443           "type": "array",\r
444           "items": {\r
445             "$ref": "#/definitions/vnffgInfo"\r
446           }\r
447         },\r
448         "nsState": {\r
449           "type": "string"\r
450         }\r
451       }\r
452     },\r
453     "vnfInfo": {\r
454       "type": "object",\r
455       "properties": {\r
456         "vnfInstanceId": {\r
457           "type": "string"\r
458         },\r
459         "vnfInstanceName": {\r
460           "type": "string"\r
461         },\r
462         "vnfdId": {\r
463           "type": "string"\r
464         }\r
465       }\r
466     },\r
467     "vlInfo": {\r
468       "type": "object",\r
469       "properties": {\r
470         "vlInstanceId": {\r
471           "type": "string"\r
472         },\r
473         "vlInstanceName": {\r
474           "type": "string"\r
475         },\r
476         "vldId": {\r
477           "type": "string"\r
478         },\r
479         "relatedCpInstanceId": {\r
480           "type": "array",\r
481           "items": {\r
482             "$ref": "#/definitions/cpInfo"\r
483           }\r
484         }\r
485       }\r
486     },\r
487     "cpInfo": {\r
488       "type": "object",\r
489       "properties": {\r
490         "cpInstanceId": {\r
491           "type": "string"\r
492         },\r
493         "cpInstanceName": {\r
494           "type": "string"\r
495         },\r
496         "cpdId": {\r
497           "type": "string"\r
498         }\r
499       }\r
500     },\r
501     "vnffgInfo": {\r
502       "type": "object",\r
503       "properties": {\r
504         "vnffgInstanceId": {\r
505           "type": "string"\r
506         },\r
507         "vnfId": {\r
508           "type": "string"\r
509         },\r
510         "pnfId": {\r
511           "type": "string"\r
512         },\r
513         "virtualLinkId": {\r
514           "type": "string"\r
515         },\r
516         "cpId": {\r
517           "type": "string"\r
518         },\r
519         "nfp": {\r
520           "type": "string"\r
521         }\r
522       }\r
523     },\r
524     "jobResponseInfo": {\r
525        "type": "object",\r
526        "properties": {\r
527           "status": {\r
528             "type": "string"\r
529           },\r
530          "progress":{\r
531             "type": "string"\r
532          },\r
533          "statusDescription": {\r
534             "type": "string"\r
535          },\r
536          "errorCode": {\r
537             "type": "string"\r
538          },\r
539          "responseId": {\r
540             "type": "string"\r
541         }\r
542        }\r
543     },\r
544     "JobDetailInfo":{\r
545       "type": "object",\r
546       "properties": {\r
547             "jobId": {\r
548                "type": "string"\r
549              },\r
550             "responseDescriptor": \r
551             {\r
552                 "type":"object",\r
553                 "properties": {\r
554                     "status": {\r
555                        "type": "string"\r
556                     },\r
557                     "progress":{\r
558                        "type": "string"\r
559                     },\r
560                     "statusDescription": {\r
561                        "type": "string"\r
562                     },\r
563                     "errorCode": {\r
564                        "type": "string"\r
565                     },\r
566                     "responseId": {\r
567                        "type": "string"\r
568                     },\r
569                     "responseHistoryList": {\r
570                         "type": "array",\r
571                         "items": {\r
572                            "$ref": "#/definitions/jobResponseInfo"\r
573                         }\r
574                     }\r
575                 }\r
576            }\r
577       }\r
578     }\r
579   }\r
580 }