Fix container startup
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / generatedapis / src / main / resources / so.vnfm.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "1.0.0",
5     "title": "ONAP SO VNFM Adapter API",
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/{vnfmId}/vnfs": {
26       "post": {
27         "tags": [
28           "SO VNFM Adaptor"
29         ],
30         "summary": "VNF create",
31         "description": "VNF create",
32         "operationId": "vnf_create",
33         "consumes": [
34           "application/json"
35         ],
36         "produces": [
37           "application/json"
38         ],
39         "parameters": [
40           {
41             "required": true,
42             "type": "string",
43             "description": "The identifier of the VNFM in A&AI",
44             "name": "vnfmId",
45             "in": "path"
46           },
47           {
48             "in": "body",
49             "name": "body",
50             "description": "VNF creation request parameter",
51             "required": true,
52             "schema": {
53               "$ref": "#/definitions/SoVnfCreationRequest"
54             }
55           }
56         ],
57         "responses": {
58           "201": {
59             "description": "",
60             "schema": {
61               "$ref": "#/definitions/SoVnfCreationResponse"
62             }
63           }
64         }
65       }
66     },
67     "/so/{vnfmId}/vnfs/{vnfId}": {
68       "post": {
69         "tags": [
70           "SO VNFM Adaptor"
71         ],
72         "summary": "VNF activation",
73         "description": "VNF activation",
74         "operationId": "vnf_activate",
75         "consumes": [
76           "application/json"
77         ],
78         "produces": [
79           "application/json"
80         ],
81         "parameters": [
82           {
83             "required": true,
84             "type": "string",
85             "description": "The identifier of the VNFM in A&AI",
86             "name": "vnfmId",
87             "in": "path"
88           },
89           {
90             "required": true,
91             "type": "string",
92             "description": "The identifier of the VNF in A&AI",
93             "name": "vnfId",
94             "in": "path"
95           },
96           {
97             "in": "body",
98             "name": "body",
99             "description": "instantiate request param",
100             "required": true,
101             "schema": {
102               "$ref": "#/definitions/SoVnfActivationRequest"
103             }
104           }
105         ],
106         "responses": {
107           "201": {
108             "description": "",
109             "schema": {
110               "$ref": "#/definitions/SoJobHandler"
111             }
112           }
113         }
114       },
115       "delete": {
116         "tags": [
117           "SO VNFM Adaptor"
118         ],
119         "summary": "Deletes VNF",
120         "description": "Deletes the VNF. If the VNF was instantiated VNF termination must be called before VNF deletion",
121         "operationId": "delete_vnf",
122         "consumes": [
123           "application/json"
124         ],
125         "produces": [
126           "application/json"
127         ],
128         "parameters": [
129           {
130             "required": true,
131             "type": "string",
132             "description": "The identifier of the VNFM in A&AI",
133             "name": "vnfmId",
134             "in": "path"
135           },
136           {
137             "required": true,
138             "type": "string",
139             "description": "The identifier of the VNF in A&AI",
140             "name": "vnfId",
141             "in": "path"
142           }
143         ],
144         "responses": {
145           "204": {
146             "description": "The VNF was deleted successfully"
147           }
148         }
149       }
150     },
151     "/so/{vnfmId}/vnfs/{vnfId}/scale": {
152       "post": {
153         "tags": [
154           "SO VNFM Adaptor"
155         ],
156         "summary": "VNF scale",
157         "description": "VNF scale request",
158         "operationId": "vnf_scale",
159         "consumes": [
160           "application/json"
161         ],
162         "produces": [
163           "application/json"
164         ],
165         "parameters": [
166           {
167             "required": true,
168             "type": "string",
169             "description": "The identifier of the VNFM in A&AI",
170             "name": "vnfmId",
171             "in": "path"
172           },
173           {
174             "required": true,
175             "type": "string",
176             "description": "The identifier of the VNF in A&AI",
177             "name": "vnfId",
178             "in": "path"
179           },
180           {
181             "in": "body",
182             "name": "body",
183             "description": "VNF scale request parameters",
184             "required": true,
185             "schema": {
186               "$ref": "#/definitions/SoVnfScaleRequest"
187             }
188           }
189         ],
190         "responses": {
191           "201": {
192             "description": "",
193             "schema": {
194               "$ref": "#/definitions/SoJobHandler"
195             }
196           }
197         }
198       }
199     },
200     "/so/{vnfmId}/vnfs/{vnfId}/customOperation": {
201       "post": {
202         "tags": [
203           "SO VNFM Adaptor"
204         ],
205         "summary": "VNF scale",
206         "description": "VNF scale request",
207         "operationId": "vnf_scale",
208         "consumes": [
209           "application/json"
210         ],
211         "produces": [
212           "application/json"
213         ],
214         "parameters": [
215           {
216             "required": true,
217             "type": "string",
218             "description": "The identifier of the VNFM in A&AI",
219             "name": "vnfmId",
220             "in": "path"
221           },
222           {
223             "required": true,
224             "type": "string",
225             "description": "The identifier of the VNF in A&AI",
226             "name": "vnfId",
227             "in": "path"
228           },
229           {
230             "in": "body",
231             "name": "body",
232             "description": "VNF scale request parameters",
233             "required": true,
234             "schema": {
235               "$ref": "#/definitions/SoVnfCustomOperation"
236             }
237           }
238         ],
239         "responses": {
240           "201": {
241             "description": "",
242             "schema": {
243               "$ref": "#/definitions/SoJobHandler"
244             }
245           }
246         }
247       }
248     },
249     "/so/{vnfmId}/vnfs/{vnfId}/heal": {
250       "post": {
251         "tags": [
252           "SO VNFM Adaptor"
253         ],
254         "summary": "VNF heal",
255         "description": "VNF heal",
256         "operationId": "vnf_heal",
257         "consumes": [
258           "application/json"
259         ],
260         "produces": [
261           "application/json"
262         ],
263         "parameters": [
264           {
265             "required": true,
266             "type": "string",
267             "description": "The identifier of the VNFM in A&AI",
268             "name": "vnfmId",
269             "in": "path"
270           },
271           {
272             "required": true,
273             "type": "string",
274             "description": "The identifier of the VNF in A&AI",
275             "name": "vnfId",
276             "in": "path"
277           },
278           {
279             "in": "body",
280             "name": "body",
281             "description": "VNF heal request parameters",
282             "required": true,
283             "schema": {
284               "$ref": "#/definitions/SoVnfHealRequest"
285             }
286           }
287         ],
288         "responses": {
289           "201": {
290             "description": "",
291             "schema": {
292               "$ref": "#/definitions/SoJobHandler"
293             }
294           }
295         }
296       }
297     },
298     "/so/{vnfmId}/vnfs/{vnfId}/terminate": {
299       "post": {
300         "tags": [
301           "SO VNFM Adaptor"
302         ],
303         "summary": "VNF terminate",
304         "description": "VNF terminate",
305         "operationId": "vnf_terminate",
306         "consumes": [
307           "application/json"
308         ],
309         "produces": [
310           "application/json"
311         ],
312         "parameters": [
313           {
314             "required": true,
315             "type": "string",
316             "description": "The identifier of the VNFM in A&AI",
317             "name": "vnfmId",
318             "in": "path"
319           },
320           {
321             "required": true,
322             "type": "string",
323             "description": "The identifier of the VNF in A&AI",
324             "name": "vnfId",
325             "in": "path"
326           },
327           {
328             "in": "body",
329             "name": "body",
330             "description": "VNF termination request parameters",
331             "required": true,
332             "schema": {
333               "$ref": "#/definitions/SoVnfTerminationRequest"
334             }
335           }
336         ],
337         "responses": {
338           "201": {
339             "description": "",
340             "schema": {
341               "$ref": "#/definitions/SoJobHandler"
342             }
343           }
344         }
345       }
346     },
347     "/so/{vnfmId}/jobs/{jobId}": {
348       "get": {
349         "tags": [
350           "SO VNFM Adaptor"
351         ],
352         "summary": "Query job status",
353         "description": "Query the job status",
354         "operationId": "get_jobstatus",
355         "parameters": [
356           {
357             "required": true,
358             "type": "string",
359             "description": "The identifier of the VNFM in A&AI",
360             "name": "vnfmId",
361             "in": "path"
362           },
363           {
364             "required": true,
365             "type": "string",
366             "description": "The identifier of the job",
367             "name": "jobId",
368             "in": "path"
369           }
370         ],
371         "responses": {
372           "202": {
373             "description": "The details of a job",
374             "schema": {
375               "$ref": "#/definitions/SoJobDetail"
376             }
377           },
378           "404": {
379             "description": "The job is unknown to the VNFM. The VNFM does not keep finished jobs for forever.",
380             "schema": {
381               "$ref": "#/definitions/SoJobDetail"
382             }
383           }
384         }
385       }
386     }
387   },
388   "definitions": {
389     "SoJobHandler": {
390       "type": "object",
391       "properties": {
392         "jobId": {
393           "required": true,
394           "description": "The identifier of the job",
395           "type": "string"
396         }
397       }
398     },
399     "SoJobStatus": {
400       "description": "The status of the job",
401       "type": "string",
402       "enum": [
403         "started",
404         "finished",
405         "failed"
406       ]
407     },
408     "SoJobDetail": {
409       "allOf": [
410         {
411           "$ref": "#/definitions/SoJobHandler"
412         },
413         {
414           "type": "object",
415           "properties": {
416             "status": {
417               "required": true,
418               "description": "The status of the job",
419                "$ref": "#/definitions/SoJobStatus"
420             },
421             "description": {
422               "required": true,
423               "description": "The description of the current state of the job",
424               "type": "string"
425             }
426           }
427         }
428       ]
429     },
430     "SoVnfCreationRequest": {
431       "type": "object",
432       "properties": {
433         "name": {
434           "required": true,
435           "description": "The name of the VNF",
436           "type": "string"
437         },
438         "csarId": {
439           "required": true,
440           "description": "The identifier of the VNF package in SDC",
441           "type": "string"
442         },
443         "description": {
444           "required": false,
445           "description": "The description of the VNF",
446           "type": "string"
447         },
448         "additionalParams": {
449           "description": "Additional VNFM specific parameters",
450           "type": "object",
451           "additionalProperties": true
452         }
453       }
454     },
455     "SoVnfCreationResponse": {
456       "type": "object",
457       "properties": {
458         "vnfId": {
459           "required": true,
460           "description": "The identifier of the created VNF",
461           "type": "string"
462         }
463       }
464     },
465     "SoVduMapping": {
466       "type": "object",
467       "properties": {
468         "vduId": {
469           "required": true,
470           "description": "The identifier of the VDU within the VNF package",
471           "type": "string"
472         },
473         "imageId": {
474           "required": true,
475           "description": "The provider id of the image to be used for the VDU",
476           "type": "string"
477         },
478         "flavourId": {
479           "required": true,
480           "description": "The provider id of the flavour to be used for the VDU",
481           "type": "string"
482         }
483       }
484     },
485     "SoServerMapping": {
486       "type": "object",
487       "description": "Maps a server instance to a VDU and availability zone",
488       "properties": {
489         "vduId": {
490           "required": true,
491           "description": "The identifier of the VDU",
492           "type": "string"
493         },
494         "availabilityZoneId": {
495           "required": false,
496           "description": "The provider id of the availability zone to be used for the server instance",
497           "type": "string"
498         }
499       }
500     },
501     "SoAssignedAddresses": {
502       "type": "object",
503       "properties": {
504         "cpdId" : {
505           "required": true,
506           "description": "The identifier of the connection point descriptor",
507           "type" : "string"
508         },
509         "ipAddress": {
510           "required": true,
511           "description": "The IP address to be used",
512           "type": "string"
513         }
514       }
515     },
516     "SoNetworkMapping": {
517       "type": "object",
518       "properties": {
519         "vldId": {
520           "required": true,
521           "description": "The identifier of the network in the VNF package",
522           "type": "string"
523         },
524         "networkProviderId": {
525           "required": true,
526           "description": "The provider id of the network be used for the given purpose",
527           "type": "string"
528         },
529         "assignedAddresses": {
530           "required": true,
531           "description": "The assigned network addresses",
532           "type" : "array",
533           "items": {
534             "$ref": "#/definitions/SoAssignedAddresses"
535           }
536         }
537       }
538     },
539     "SoVnfActivationRequest": {
540       "type": "object",
541       "properties": {
542         "vimId" : {
543           "required" : true,
544            "type" : "string",
545           "description" : "The identifier of the VIM on which the VNF is to be instantiated"
546         },
547         "serverMappings": {
548           "required": true,
549           "description": "The server mappings",
550           "type" : "array",
551           "items": {
552             "$ref": "#/definitions/SoServerMapping"
553           }
554         },
555         "vduMappings": {
556           "required": true,
557           "description": "The VDU mappings",
558           "type" : "array",
559           "items": {
560             "$ref": "#/definitions/SoVduMapping"
561           }
562         },
563         "networkMappings": {
564           "required": true,
565           "description": "The network mappings",
566           "type" : "array",
567           "items": {
568             "$ref": "#/definitions/SoNetworkMapping"
569           }
570         },
571         "additionalParams": {
572           "description": "Additional VNFM specific parameters",
573           "type": "object",
574           "additionalProperties": true
575         }
576       }
577     },
578     "SoScaleDirection": {
579       "description": "The direction of the scale",
580       "type": "string",
581       "enum": [
582         "in",
583         "out"
584       ]
585     },
586     "SoVnfScaleRequest": {
587       "type": "object",
588       "properties": {
589         "aspectId": {
590           "type": "string",
591           "description": "The identifier of the scaling aspect in the VNF package"
592         },
593         "steps": {
594           "type": "integer",
595           "description": "The expected absolute scale level"
596         },
597         "direction": {
598           "required": true,
599           "description": "The direction of the scale",
600           "$ref": "#/definitions/SoScaleDirection"
601         },
602         "serverMappings": {
603           "required": true,
604           "description": "The server mappings",
605           "items": {
606             "$ref": "#/definitions/SoServerMapping"
607           }
608         },
609         "additionalParams": {
610           "description": "Additional VNFM specific parameters",
611           "type": "object",
612           "additionalProperties": true
613         }
614       }
615     },
616     "SoVnfCustomOperation": {
617       "type": "object",
618       "properties": {
619         "operationId": {
620           "required" : true,
621           "type": "string",
622           "description": "The identifier of the custom operation"
623         },
624         "additionalParams": {
625           "description": "Additional VNFM specific parameters",
626           "type": "object",
627           "additionalProperties": true
628         }
629       }
630     },
631     "SoVnfHealRequest": {
632       "type": "object",
633       "properties": {
634         "vnfcId": {
635           "type": "string",
636           "description": "The identifier of the VNFC to be healed"
637         },
638         "additionalParams": {
639           "description": "Additional VNFM specific parameters",
640           "type": "object",
641           "additionalProperties": true
642         }
643       }
644     },
645     "SoTerminationMode": {
646       "description": "The way in which the VNF is terminated",
647       "type": "string",
648       "enum": [
649         "forceful",
650         "graceful"
651       ]
652     },
653     "SoVnfTerminationRequest": {
654       "type": "object",
655       "properties": {
656         "mode" : {
657           "required" : true,
658           "description" : "The VNF termination mode",
659           "$ref": "#/definitions/SoTerminationMode"
660         },
661         "gracefulTerminationTimeoutInMs": {
662           "required" : false,
663           "type": "integer",
664           "description": "The timeout for graceful termination. After the timeout has expired forceful termination is attempted."
665         },
666         "additionalParams": {
667           "description": "Additional VNFM specific parameters",
668           "type": "object",
669           "additionalProperties": true
670         }
671       }
672     }
673   }
674 }