Add SO APIs to Nokia VNFM adapter
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / generatedapis / src / main / resources / so.vnfm.v2.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "2.0.0",
5     "title": "ONAP SO VNFM Adapter API v2",
6     "description": "Describes the API between SO and the adapter for VNFM",
7     "contact": {
8       "name": "ONAP SO VNFM",
9       "email": "onap-discuss@lists.onap.org",
10       "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/lcm"
11     }
12   },
13   "basePath": "/api/v1",
14   "schemes": [
15     "http",
16     "https"
17   ],
18   "consumes": [
19     "application/json"
20   ],
21   "produces": [
22     "application/json"
23   ],
24   "paths": {
25     "/so/v2/ping": {
26       "get": {
27         "tags": [
28           "SO VNFM Adaptor V2"
29         ],
30         "summary": "Test VNFM driver health",
31         "description": "Test VNFM driver health",
32         "responses": {
33           "204": {
34             "description": "VNFM adapter is healthy"
35           }
36         }
37       }
38     },
39     "/so/v2/vnfs/{vnfIdInAai}/rollback": {
40       "post": {
41         "tags": [
42           "SO VNFM Adaptor V2"
43         ],
44         "summary": "Rollback VNF update operation",
45         "description": "Rollback VNF update operation",
46         "operationId": "rollback",
47         "consumes": [
48           "application/json"
49         ],
50         "parameters": [
51           {
52             "required": true,
53             "type": "string",
54             "description": "The identifier of the VNF",
55             "name": "vnfIdInAai",
56             "in": "path"
57           },
58           {
59             "in": "body",
60             "name": "body",
61             "description": "Rollback parameters",
62             "required": true,
63             "schema": {
64               "$ref": "#/definitions/SoV2RollbackVnfUpdate"
65             }
66           }
67         ],
68         "responses": {
69           "204": {
70             "description": "Operation has been rolled back"
71           }
72         }
73       }
74     },
75     "/so/v2/vnfs/{vnfIdInAai}": {
76       "get": {
77         "tags": [
78           "SO VNFM Adaptor V2"
79         ],
80         "summary": "VNF query",
81         "description": "VNF query",
82         "operationId": "vnf_query",
83         "consumes": [
84           "application/json"
85         ],
86         "produces": [
87           "application/json"
88         ],
89         "parameters": [
90           {
91             "required": true,
92             "type": "string",
93             "description": "The identifier of the VNF in A&AI.",
94             "name": "vnfIdInAai",
95             "in": "path"
96           },
97           {
98             "in": "body",
99             "name": "body",
100             "description": "VNF creation query parameter",
101             "required": true,
102             "schema": {
103               "$ref": "#/definitions/SoV2VnfQueryRequest"
104             }
105           }
106         ],
107         "responses": {
108           "201": {
109             "description": "",
110             "schema": {
111               "$ref": "#/definitions/SoV2VnfQueryResponse"
112             }
113           },
114           "404": {
115             "descriotion": "The VNF does not exist on the VNFM side"
116           }
117         }
118       },
119       "post": {
120         "tags": [
121           "SO VNFM Adaptor V2"
122         ],
123         "summary": "VNF create",
124         "description": "VNF create",
125         "operationId": "vnf_create",
126         "consumes": [
127           "application/json"
128         ],
129         "parameters": [
130           {
131             "required": true,
132             "type": "string",
133             "description": "The identifier of the VNF",
134             "name": "vnfIdInAai",
135             "in": "path"
136           },
137           {
138             "in": "body",
139             "name": "body",
140             "description": "VNF creation query parameter",
141             "required": true,
142             "schema": {
143               "$ref": "#/definitions/SoV2VnfCreateRequest"
144             }
145           }
146         ],
147         "responses": {
148           "204": {
149             "description": "The VNF was created on the VNFM side."
150           },
151           "400": {
152             "description": "The VNF could not be instantiated on the VNFM side. Failure has been treated according to deleteUponFailure parameter"
153           }
154         }
155       },
156       "put": {
157         "tags": [
158           "SO VNFM Adaptor V2"
159         ],
160         "summary": "VNF update",
161         "description": "VNF update",
162         "operationId": "vnf_update",
163         "consumes": [
164           "application/json"
165         ],
166         "produces": [
167           "application/json"
168         ],
169         "parameters": [
170           {
171             "required": true,
172             "type": "string",
173             "description": "The identifier of the VNF",
174             "name": "vnfIdInAai",
175             "in": "path"
176           },
177           {
178             "in": "body",
179             "name": "body",
180             "description": "VNF update parameter",
181             "required": true,
182             "schema": {
183               "$ref": "#/definitions/SoV2VnfUpdateRequest"
184             }
185           }
186         ],
187         "responses": {
188           "200": {
189             "description": "The VNF update has finished. Success is indicated in the success field.",
190             "schema": {
191               "$ref": "#/definitions/SoV2VnfUpdateResponse"
192             }
193           }
194         }
195       },
196       "delete": {
197         "tags": [
198           "SO VNFM Adaptor V2"
199         ],
200         "summary": "VNF delete",
201         "description": "VNF delete",
202         "operationId": "vnf_delete",
203         "consumes": [
204           "application/json"
205         ],
206         "parameters": [
207           {
208             "required": true,
209             "type": "string",
210             "description": "The identifier of the VNF",
211             "name": "vnfIdInAai",
212             "in": "path"
213           },
214           {
215             "in": "body",
216             "name": "body",
217             "description": "VNF delete parameter",
218             "required": true,
219             "schema": {
220               "$ref": "#/definitions/SoV2VnfDeleteRequest"
221             }
222           }
223         ],
224         "responses": {
225           "204": {
226             "description": "The VNF was successfully deleted."
227           }
228         }
229       }
230     },
231     "/so/v2/vfmodule/{vnfIdInAai}/{vfModuleId}": {
232       "post": {
233         "tags": [
234           "SO VNFM Adaptor V2"
235         ],
236         "summary": "VF module create",
237         "description": "VF module create",
238         "operationId": "vf_module_create",
239         "consumes": [
240           "application/json"
241         ],
242         "parameters": [
243           {
244             "required": true,
245             "type": "string",
246             "description": "The identifier of VNF in A&AI.",
247             "name": "vnfIdInAai",
248             "in": "path"
249           },
250           {
251             "required": true,
252             "type": "string",
253             "description": "The identifier of the VF module in A&AI",
254             "name": "vfModuleId",
255             "in": "path"
256           },
257           {
258             "in": "body",
259             "name": "body",
260             "description": "VNF creation query parameter",
261             "required": true,
262             "schema": {
263               "$ref": "#/definitions/SoV2VfModuleCreateRequest"
264             }
265           }
266         ],
267         "responses": {
268           "201": {
269             "description": "The VF module has been created"
270           }
271         }
272       },
273       "put": {
274         "tags": [
275           "SO VNFM Adaptor V2"
276         ],
277         "summary": "VF module update",
278         "description": "VF module update",
279         "operationId": "vf_module_update",
280         "consumes": [
281           "application/json"
282         ],
283         "produces": [
284           "application/json"
285         ],
286         "parameters": [
287           {
288             "required": true,
289             "type": "string",
290             "description": "The identifier of VNF in A&AI.",
291             "name": "vnfIdInAai",
292             "in": "path"
293           },
294           {
295             "required": true,
296             "type": "string",
297             "description": "The identifier of the VF module in A&AI",
298             "name": "vfModuleId",
299             "in": "path"
300           },
301           {
302             "in": "body",
303             "name": "body",
304             "description": "VNF creation query parameter",
305             "required": true,
306             "schema": {
307               "$ref": "#/definitions/SoV2VnfUpdateRequest"
308             }
309           }
310         ],
311         "responses": {
312           "201": {
313             "schema": {
314               "$ref": "#/definitions/SoV2VnfUpdateResponse"
315             }
316           }
317         }
318       },
319       "delete": {
320         "tags": [
321           "SO VNFM Adaptor V2"
322         ],
323         "summary": "VF module delete",
324         "description": "VF module delete",
325         "operationId": "vf_module_delete",
326         "consumes": [
327           "application/json"
328         ],
329         "parameters": [
330           {
331             "required": true,
332             "type": "string",
333             "description": "The identifier of VNF in A&AI.",
334             "name": "vnfIdInAai",
335             "in": "path"
336           },
337           {
338             "required": true,
339             "type": "string",
340             "description": "The identifier of the VF module in A&AI",
341             "name": "vfModuleId",
342             "in": "path"
343           },
344           {
345             "in": "body",
346             "name": "body",
347             "description": "VNF delete parameter",
348             "required": true,
349             "schema": {
350               "$ref": "#/definitions/SoV2VnfDeleteRequest"
351             }
352           }
353         ],
354         "responses": {
355           "204": {
356             "description": "The VNF was successfully deleted."
357           }
358         }
359       }
360     },
361     "/so/v2/vfmodule/{vnfIdInAai}/{vfModuleId}/rollback": {
362       "put": {
363         "tags": [
364           "SO VNFM Adaptor V2"
365         ],
366         "summary": "VF module update rollback",
367         "description": "VF module update rollback",
368         "operationId": "vf_module_update rollback",
369         "consumes": [
370           "application/json"
371         ],
372         "produces": [
373           "application/json"
374         ],
375         "parameters": [
376           {
377             "required": true,
378             "type": "string",
379             "description": "The identifier of VNF in A&AI.",
380             "name": "vnfIdInAai",
381             "in": "path"
382           },
383           {
384             "required": true,
385             "type": "string",
386             "description": "The identifier of the VF module in A&AI",
387             "name": "vfModuleId",
388             "in": "path"
389           },
390           {
391             "in": "body",
392             "name": "body",
393             "description": "VNF update rollback parameter",
394             "required": true,
395             "schema": {
396               "$ref": "#/definitions/SoV2RollbackVnfUpdate"
397             }
398           }
399         ],
400         "responses": {
401           "204": {
402             "description": "Operation has been rolled back"
403           }
404         }
405       }
406     }
407   },
408   "definitions": {
409     "SoMsoRequest": {
410       "type": "object",
411       "properties": {
412         "requestId": {
413           "required": true,
414           "description": "The identifier of the request in SO. Used to track requests.",
415           "type": "string"
416         },
417         "serviceInstanceId": {
418           "required": true,
419           "description": "The identifier of the service instance in A&AI.",
420           "type": "string"
421         }
422       }
423     },
424     "SoV2VnfQueryRequest": {
425       "type": "object",
426       "properties": {
427         "msoRequest": {
428           "required": true,
429           "$ref": "#/definitions/SoMsoRequest"
430         }
431       }
432     },
433     "SoVnfStatus": {
434       "description": "The status of the VNF",
435       "type": "string",
436       "enum": [
437         "ACTIVE",
438         "FAILED",
439         "NOTFOUND",
440         "UNKNOWN"
441       ]
442     },
443     "SoOutput": {
444       "type": "object",
445       "additionalProperties": {
446         "type": "string"
447       }
448     },
449     "SoInput": {
450       "type": "object",
451       "additionalProperties": {
452         "type": "string"
453       }
454     },
455     "SoV2VnfQueryResponse": {
456       "type": "object",
457       "properties": {
458         "status": {
459           "required": true,
460           "description": "The status of the VNF",
461           "$ref": "#/definitions/SoVnfStatus"
462         }
463       }
464     },
465     "SoV2VnfCreateRequest": {
466       "type": "object",
467       "properties": {
468         "cloudOwner": {
469           "required": true,
470           "type": "string",
471           "description": "The owner of cloud in A&AI."
472         },
473         "regionName": {
474           "required": true,
475           "type": "string",
476           "description": "The regionName of cloud in A&AI."
477         },
478         "tenantId": {
479           "required": true,
480           "type": "string",
481           "description": "The identifier of the tenant."
482         },
483         "name": {
484           "required": true,
485           "type": "string",
486           "description": "The name of the VNF."
487         },
488         "inputs": {
489           "required": false,
490           "description": "The inputs of the VNF.",
491           "$ref": "#/definitions/SoInput"
492         },
493         "failIfExists": {
494           "required": false,
495           "description": "Should the VNF creation fail if the VNF already exists. (defaults to false)",
496           "type": "boolean"
497         },
498         "deleteUponFailure": {
499           "required": false,
500           "description": "Delete VNF in case of failure. (defaults to false)",
501           "type": "boolean"
502         },
503         "msoRequest": {
504           "required": false,
505           "$ref": "#/definitions/SoMsoRequest"
506         }
507       }
508     },
509     "SoMsoRollback": {
510       "type": "object",
511       "description": "Generic rollback parameters",
512       "properties": {
513         "deleteIfExists": {
514           "required": true,
515           "description": "Delete the VNF if exists",
516           "type": "boolean"
517         },
518         "vnfIdInAai": {
519           "required": true,
520           "description": "The identifier of the VNF in AAI",
521           "type": "string"
522         },
523         "msoRequest": {
524           "required": true,
525           "description": "The pointer to the original request that triggered the rollback",
526           "$ref": "#/definitions/SoMsoRequest"
527         }
528       }
529     },
530     "OriginalVnfProperties": {
531       "type": "object",
532       "additionalProperties": {
533         "type": "string"
534       }
535     },
536     "SoV2RollbackVnfUpdate": {
537       "type": "object",
538       "properties": {
539         "originalVnfProperties": {
540           "required": false,
541           "description": "The original VNF properties before the operation",
542           "$ref": "#/definitions/OriginalVnfProperties"
543         }
544       }
545     },
546     "SoV2VnfUpdateRequest": {
547       "type": "object",
548       "properties": {
549         "inputs": {
550           "required": false,
551           "description": "The inputs of the VNF.",
552           "$ref": "#/definitions/SoInput"
553         },
554         "msoRequest": {
555           "required": false,
556           "$ref": "#/definitions/SoMsoRequest"
557         }
558       }
559     },
560     "SoV2VnfUpdateResponse": {
561       "allOf": [
562         {
563           "$ref": "#/definitions/SoV2RollbackVnfUpdate"
564         },
565         {
566           "type": "object",
567           "properties": {
568             "successful": {
569               "required": true,
570               "description": "Is the update successful. The operation can be rolled back regardless of this attribute",
571               "type": "boolean"
572             }
573           }
574         }
575       ]
576     },
577     "SoV2VnfDeleteRequest": {
578       "type": "object",
579       "properties": {
580         "msoRequest": {
581           "required": false,
582           "$ref": "#/definitions/SoMsoRequest"
583         }
584       }
585     },
586     "SoV2VfModuleCreateRequest": {
587       "type": "object",
588       "properties": {
589         "scalingAspectId": {
590           "required": true,
591           "description": "The identifier of the scaling aspect",
592           "type": "string"
593         },
594         "inputs": {
595           "required": false,
596           "description": "The inputs of the VNF.",
597           "$ref": "#/definitions/SoInput"
598         },
599         "failIfExists": {
600           "required": false,
601           "description": "Should the VNF creation fail if the VNF already exists. (defaults to false)",
602           "type": "boolean"
603         },
604         "deleteUponFailure": {
605           "required": false,
606           "description": "Delete VF module in case of failure. (defaults to false)",
607           "type": "boolean"
608         },
609         "msoRequest": {
610           "required": false,
611           "$ref": "#/definitions/SoMsoRequest"
612         }
613       }
614     }
615   }
616 }