16b52b9c17fe36be3ac2c29c35e154b3dd707978
[vfc/nfvo/lcm.git] / docs / APIs / NSLCM_API / NSLCM_API_Specification_v0.1.rst
1 \r
2 \r
3 NS LCM API\r
4 ==========\r
5 \r
6  {\r
7    "swagger": "2.0",\r
8 \r
9    "info": {\r
10 \r
11      "version": "1.0.0",\r
12 \r
13      "title": "ONAP VFC Network Service Lifecycle Management API",\r
14 \r
15      "description": "VFC Network Service Lifecycle Management Rest API.",\r
16 \r
17      "contact": {\r
18 \r
19        "name": "ONAP VFC team",\r
20 \r
21        "email": "onap-discuss@lists.onap.org",\r
22 \r
23        "url": "https://gerrit.onap.org/r/#/admin/projects/vfc/nfvo/lcm"\r
24 \r
25      }\r
26 \r
27    },\r
28 \r
29    "basePath": "/api/nslcm/v1",\r
30 \r
31    "schemes": [\r
32 \r
33      "http",\r
34      "https"\r
35 \r
36    ],\r
37 \r
38    "consumes": [\r
39 \r
40      "application/json"\r
41 \r
42    ],\r
43    "produces": [\r
44 \r
45      "application/json"\r
46 \r
47    ],\r
48    "paths": {\r
49 \r
50      "/ns": {\r
51 \r
52        "post": {\r
53 \r
54          "tags": [\r
55 \r
56            "ns"\r
57 \r
58          ],\r
59          "summary": "ns create",\r
60 \r
61          "description": "ns create",\r
62 \r
63          "operationId": "ns_create",\r
64 \r
65          "parameters": [\r
66 \r
67            {\r
68 \r
69              "in": "body",\r
70 \r
71              "name": "NSCreateRequest",\r
72 \r
73              "description": "NS Instance Create Request",\r
74 \r
75              "required": true,\r
76 \r
77              "schema": {\r
78 \r
79                "$ref": "#/definitions/NsCreateRequest"\r
80 \r
81              }\r
82 \r
83            }\r
84 \r
85          ],\r
86 \r
87          "responses": {\r
88 \r
89            "200": {\r
90 \r
91              "description": "successful operation",\r
92 \r
93              "schema": {\r
94 \r
95                "$ref": "#/definitions/NsCreateResponse"\r
96 \r
97              }\r
98 \r
99            }\r
100 \r
101          }\r
102 \r
103        },\r
104 \r
105        "get": {\r
106 \r
107          "tags": [\r
108 \r
109            "ns"\r
110 \r
111          ],\r
112 \r
113          "summary": "ns get",\r
114 \r
115          "description": "ns get",\r
116 \r
117          "operationId": "ns_get",\r
118 \r
119          "parameters": [],\r
120 \r
121          "responses": {\r
122 \r
123            "200": {\r
124 \r
125              "description": "successful operation",\r
126 \r
127              "schema": {\r
128 \r
129                "$ref": "#/definitions/NsInfo"\r
130 \r
131              }\r
132 \r
133            }\r
134 \r
135          }\r
136 \r
137        }\r
138 \r
139      },\r
140 \r
141      "/ns/{nsInstanceId}/Instantiate": {\r
142 \r
143        "post": {\r
144 \r
145          "tags": [\r
146 \r
147            "ns"\r
148 \r
149          ],\r
150 \r
151          "summary": "ns Instantiate",\r
152 \r
153          "description": "ns Instantiate",\r
154 \r
155          "operationId": "ns_Instantiate",\r
156 \r
157          "parameters": [\r
158 \r
159            {\r
160              "required": true,\r
161 \r
162              "type": "string",\r
163 \r
164              "description": "",\r
165 \r
166              "name": "nsInstanceId",\r
167 \r
168              "in": "path"\r
169 \r
170            },\r
171            {\r
172 \r
173              "in": "body",\r
174 \r
175              "name": "NSInstantiateRequest",\r
176 \r
177              "description": "NS Instantiate Request Body",\r
178 \r
179              "required": true,\r
180 \r
181              "schema": {\r
182 \r
183                "$ref": "#/definitions/NsInstantiateRequest"\r
184 \r
185              }\r
186 \r
187            }\r
188 \r
189          ],\r
190 \r
191          "responses": {\r
192 \r
193            "200": {\r
194 \r
195              "description": "",\r
196 \r
197              "schema": {\r
198 \r
199                "$ref": "#/definitions/JobInfo"\r
200 \r
201              }\r
202 \r
203            },\r
204 \r
205            "201": {\r
206 \r
207              "description": "Invalid Request"\r
208 \r
209            }\r
210 \r
211          }\r
212 \r
213        }\r
214 \r
215      },\r
216 \r
217      "/ns/{nsInstanceId}/scale": {\r
218 \r
219        "post": {\r
220 \r
221          "tags": [\r
222 \r
223            "ns"\r
224 \r
225          ],\r
226 \r
227          "summary": "ns scale",\r
228 \r
229          "description": "ns scale",\r
230 \r
231          "operationId": "ns_scale",\r
232 \r
233          "parameters": [\r
234 \r
235            {\r
236 \r
237              "required": true,\r
238 \r
239              "type": "string",\r
240 \r
241              "description": "",\r
242 \r
243              "name": "nsInstanceId",\r
244 \r
245              "in": "path"\r
246 \r
247            },\r
248 \r
249            {\r
250 \r
251              "in": "body",\r
252 \r
253              "name": "ScaleNSRequest",\r
254 \r
255              "description": "Scale NS Request Body",\r
256 \r
257              "required": true,\r
258 \r
259              "schema": {\r
260 \r
261                "$ref": "#/definitions/NsScaleRequest"\r
262 \r
263              }\r
264 \r
265            }\r
266 \r
267          ],\r
268 \r
269          "responses": {\r
270 \r
271            "200": {\r
272 \r
273              "description": "",\r
274 \r
275              "schema": {\r
276 \r
277                "$ref": "#/definitions/JobInfo"\r
278 \r
279              }\r
280 \r
281            },\r
282 \r
283            "201": {\r
284 \r
285              "description": "Invalid Request"\r
286 \r
287            }\r
288 \r
289          }\r
290 \r
291        }\r
292 \r
293      },\r
294 \r
295      "/ns/{ns_instance_id}/heal": {\r
296 \r
297        "post": {\r
298 \r
299          "tags": [\r
300 \r
301            "ns"\r
302 \r
303          ],\r
304 \r
305          "summary": "ns heal",\r
306 \r
307          "description": "ns heal",\r
308 \r
309          "operationId": "ns_heal",\r
310 \r
311          "parameters": [\r
312 \r
313            {\r
314              "required": true,\r
315 \r
316              "type": "string",\r
317 \r
318              "description": "Identifier of the NS instance.",\r
319 \r
320              "name": "ns_instance_id",\r
321 \r
322              "in": "path"\r
323 \r
324            },\r
325 \r
326            {\r
327 \r
328              "in": "body",\r
329 \r
330              "name": "healVnfData",\r
331 \r
332              "description": "healVnfData",\r
333 \r
334              "required": true,\r
335 \r
336              "schema": {\r
337 \r
338                "$ref": "#/definitions/NsHealRequest"\r
339 \r
340              }\r
341 \r
342            }\r
343 \r
344          ],\r
345 \r
346          "responses": {\r
347 \r
348            "202": {\r
349 \r
350              "description": "",\r
351 \r
352              "schema": {\r
353 \r
354                "$ref": "#/definitions/JobInfo"\r
355 \r
356              }\r
357 \r
358            },\r
359 \r
360            "500": {\r
361 \r
362              "description": "the url is invalid"\r
363 \r
364            }\r
365 \r
366          }\r
367 \r
368        }\r
369 \r
370      },\r
371 \r
372      "/ns/{ns_instance_id}/terminate": {\r
373 \r
374        "post": {\r
375 \r
376          "tags": [\r
377 \r
378            "ns"\r
379 \r
380          ],\r
381 \r
382          "summary": "ns terminate",\r
383 \r
384          "description": "ns terminate",\r
385 \r
386          "operationId": "ns_terminate",\r
387 \r
388          "parameters": [\r
389 \r
390            {\r
391 \r
392              "required": true,\r
393 \r
394              "type": "string",\r
395 \r
396              "description": "Identifier of the NS instance.",\r
397 \r
398              "name": "ns_instance_id",\r
399 \r
400              "in": "path"\r
401 \r
402            },\r
403 \r
404            {\r
405              "in": "body",\r
406 \r
407              "name": "NsTerminateRequest",\r
408 \r
409              "description": "NsTerminateRequest",\r
410 \r
411              "required": true,\r
412 \r
413              "schema": {\r
414 \r
415                "$ref": "#/definitions/NsTerminateRequest"\r
416 \r
417              }\r
418 \r
419            }\r
420 \r
421          ],\r
422 \r
423          "responses": {\r
424 \r
425            "202": {\r
426 \r
427              "description": "",\r
428 \r
429              "schema": {\r
430 \r
431                "$ref": "#/definitions/JobInfo"\r
432 \r
433              }\r
434 \r
435            },\r
436 \r
437            "500": {\r
438 \r
439              "description": "the url is invalid"\r
440 \r
441            }\r
442 \r
443          }\r
444 \r
445        }\r
446 \r
447      },\r
448      "/ns/{ns_instance_id}": {\r
449 \r
450        "delete": {\r
451 \r
452          "tags": [\r
453 \r
454            "ns"\r
455 \r
456          ],\r
457 \r
458          "summary": "ns delete",\r
459 \r
460          "description": "ns delete",\r
461 \r
462          "operationId": "ns_delete",\r
463 \r
464          "parameters": [\r
465 \r
466            {\r
467              "required": true,\r
468 \r
469              "type": "string",\r
470 \r
471              "description": "Identifier of the NS instance.",\r
472 \r
473              "name": "ns_instance_id",\r
474 \r
475              "in": "path"\r
476 \r
477            }\r
478 \r
479          ],\r
480 \r
481          "responses": {\r
482 \r
483            "204": {\r
484 \r
485              "description": "The NS instance resource and the associated NS identifier were deleted successfully."\r
486 \r
487            }\r
488 \r
489          }\r
490 \r
491        }\r
492 \r
493      },\r
494 \r
495      "/jobs/{jobId}": {\r
496 \r
497        "post": {\r
498 \r
499          "tags": [\r
500 \r
501            "job"\r
502 \r
503          ],\r
504 \r
505          "summary": "jobstatus",\r
506 \r
507          "description": "",\r
508 \r
509          "operationId": "jobstatus",\r
510 \r
511          "parameters": [\r
512 \r
513            {\r
514              "required": true,\r
515 \r
516              "type": "string",\r
517 \r
518              "description": "",\r
519 \r
520              "name": "jobId",\r
521 \r
522              "in": "path"\r
523 \r
524            },\r
525 \r
526            {\r
527 \r
528              "in": "body",\r
529 \r
530              "name": "body",\r
531 \r
532              "description": "request param",\r
533 \r
534              "required": true,\r
535 \r
536              "schema": {\r
537 \r
538                "$ref": "#/definitions/JobProgressRequest"\r
539 \r
540              }\r
541 \r
542            }\r
543 \r
544          ],\r
545 \r
546          "responses": {\r
547 \r
548            "202": {\r
549 \r
550              "description": ""\r
551 \r
552            }\r
553 \r
554          }\r
555 \r
556        }\r
557 \r
558      }\r
559 \r
560    },\r
561 \r
562    "definitions": {\r
563 \r
564      "NsCreateRequest": {\r
565 \r
566        "type": "object",\r
567 \r
568        "properties": {\r
569 \r
570          "csarId": {\r
571 \r
572            "type": "string",\r
573 \r
574            "description": "the NS package ID"\r
575 \r
576          },\r
577 \r
578          "nsName": {\r
579 \r
580            "type": "string"\r
581 \r
582          },\r
583 \r
584          "description": {\r
585 \r
586            "type": "string"\r
587 \r
588          }\r
589 \r
590        }\r
591 \r
592      },\r
593 \r
594      "NsCreateResponse": {\r
595 \r
596        "type": "object",\r
597 \r
598        "properties": {\r
599 \r
600          "nsInstanceId": {\r
601 \r
602            "type": "string"\r
603 \r
604          }\r
605 \r
606        }\r
607 \r
608      },\r
609      "NsInstantiateRequest": {\r
610 \r
611        "type": "object",\r
612 \r
613        "properties": {\r
614 \r
615          "LocationConstraints": {\r
616 \r
617            "type": "array",\r
618 \r
619            "items": {\r
620 \r
621              "$ref": "#/definitions/LocationConstraint"\r
622 \r
623            }\r
624 \r
625          },\r
626 \r
627          "additionalParamForNs": {\r
628 \r
629            "type": "string"\r
630 \r
631          }\r
632 \r
633        }\r
634 \r
635      },\r
636 \r
637      "LocationConstraint": {\r
638 \r
639        "type": "object",\r
640 \r
641        "properties": {\r
642 \r
643          "vnfProfileId": {\r
644 \r
645            "type": "string"\r
646 \r
647          },\r
648          "locationConstraints": {\r
649 \r
650            "type": "object",\r
651 \r
652            "properties": {\r
653 \r
654              "vimid": {\r
655 \r
656                "type": "string"\r
657 \r
658              }\r
659 \r
660            }\r
661 \r
662          }\r
663 \r
664        }\r
665 \r
666      },\r
667 \r
668      "NsScaleRequest": {\r
669 \r
670        "type": "object",\r
671 \r
672        "properties": {\r
673 \r
674          "scaleType": {\r
675 \r
676            "type": "string"\r
677 \r
678          },\r
679 \r
680          "scaleNsByStepsData": {\r
681 \r
682            "$ref": "#/definitions/NsScaleByStepsData"\r
683 \r
684          }\r
685 \r
686        }\r
687 \r
688      },\r
689 \r
690      "NsScaleByStepsData": {\r
691 \r
692        "type": "object",\r
693 \r
694        "properties": {\r
695 \r
696          "scalingDirection": {\r
697 \r
698            "type": "string"\r
699 \r
700          },\r
701 \r
702          "aspectId": {\r
703 \r
704            "type": "string"\r
705 \r
706          },\r
707 \r
708          "numberOfSteps": {\r
709 \r
710            "type": "integer"\r
711 \r
712          }\r
713 \r
714        }\r
715 \r
716      },\r
717 \r
718      "NsHealRequest": {\r
719 \r
720        "type": "object",\r
721 \r
722        "properties": {\r
723 \r
724          "vnfInstanceId": {\r
725 \r
726            "type": "string"\r
727 \r
728          },\r
729 \r
730          "cause": {\r
731 \r
732            "type": "string"\r
733 \r
734          },\r
735 \r
736          "additionalParams": {\r
737 \r
738            "type": "object",\r
739 \r
740            "properties": {\r
741 \r
742              "action": {\r
743 \r
744                "type": "string"\r
745 \r
746              },\r
747 \r
748              "actionvminfo": {\r
749 \r
750                "type": "object",\r
751 \r
752                "properties": {\r
753 \r
754                  "vmid": {\r
755 \r
756                    "type": "string"\r
757 \r
758                  },\r
759 \r
760                  "vmname": {\r
761 \r
762                    "type": "string"\r
763 \r
764                  }\r
765 \r
766                }\r
767 \r
768              }\r
769 \r
770            }\r
771 \r
772          }\r
773 \r
774        }\r
775 \r
776      },\r
777 \r
778      "NsTerminateRequest": {\r
779 \r
780        "type": "object",\r
781 \r
782        "properties": {\r
783 \r
784          "terminationType": {\r
785 \r
786            "type": "string"\r
787 \r
788          },\r
789 \r
790          "gracefulTerminationTimeout": {\r
791 \r
792            "type": "string"\r
793 \r
794          }\r
795 \r
796        }\r
797 \r
798      },\r
799 \r
800      "JobInfo": {\r
801 \r
802        "type": "object",\r
803 \r
804        "properties": {\r
805 \r
806          "jobId": {\r
807 \r
808            "type": "string"\r
809 \r
810          }\r
811 \r
812        }\r
813 \r
814      },\r
815 \r
816      "JobProgressRequest": {\r
817 \r
818        "type": "object",\r
819 \r
820        "properties": {\r
821 \r
822          "progress": {\r
823 \r
824            "type": "string"\r
825 \r
826          },\r
827 \r
828          "desc": {\r
829 \r
830            "type": "string"\r
831 \r
832          },\r
833 \r
834          "errcode": {\r
835 \r
836            "type": "string"\r
837 \r
838          }\r
839 \r
840        }\r
841 \r
842      },\r
843 \r
844      "NsInfo": {\r
845 \r
846        "type": "object",\r
847 \r
848        "properties": {\r
849 \r
850          "nsInstanceId": {\r
851 \r
852            "type": "string"\r
853 \r
854          },\r
855 \r
856          "nsName": {\r
857 \r
858            "type": "string"\r
859 \r
860          },\r
861 \r
862          "description": {\r
863 \r
864            "type": "string"\r
865 \r
866          },\r
867 \r
868          "nsdId": {\r
869 \r
870            "type": "string"\r
871 \r
872          },\r
873 \r
874          "vnfInfo": {\r
875 \r
876            "type": "array",\r
877 \r
878            "items": {\r
879 \r
880              "$ref": "#/definitions/vnfInfo"\r
881 \r
882            }\r
883 \r
884          },\r
885 \r
886          "vlInfo": {\r
887 \r
888            "type": "array",\r
889 \r
890            "items": {\r
891 \r
892              "$ref": "#/definitions/vlInfo"\r
893 \r
894            }\r
895 \r
896          },\r
897 \r
898          "vnffgInfo": {\r
899 \r
900            "type": "array",\r
901 \r
902            "items": {\r
903 \r
904              "$ref": "#/definitions/vnffgInfo"\r
905 \r
906            }\r
907 \r
908          },\r
909 \r
910          "nsState": {\r
911 \r
912            "type": "string"\r
913 \r
914          }\r
915 \r
916        }\r
917 \r
918      },\r
919 \r
920      "vnfInfo": {\r
921 \r
922        "type": "object",\r
923 \r
924        "properties": {\r
925 \r
926          "vnfInstanceId": {\r
927 \r
928            "type": "string"\r
929 \r
930          },\r
931 \r
932          "vnfInstanceName": {\r
933 \r
934            "type": "string"\r
935 \r
936          },\r
937 \r
938          "vnfdId": {\r
939 \r
940            "type": "string"\r
941 \r
942          }\r
943 \r
944        }\r
945 \r
946      },\r
947 \r
948      "vlInfo": {\r
949 \r
950        "type": "object",\r
951 \r
952        "properties": {\r
953 \r
954          "vlInstanceId": {\r
955 \r
956            "type": "string"\r
957 \r
958          },\r
959 \r
960          "vlInstanceName": {\r
961 \r
962            "type": "string"\r
963 \r
964          },\r
965 \r
966          "vldId": {\r
967 \r
968            "type": "string"\r
969 \r
970          },\r
971 \r
972          "relatedCpInstanceId": {\r
973 \r
974            "type": "array",\r
975 \r
976            "items": {\r
977 \r
978              "$ref": "#/definitions/cpInfo"\r
979 \r
980            }\r
981 \r
982          }\r
983 \r
984        }\r
985 \r
986      },\r
987 \r
988      "cpInfo": {\r
989 \r
990        "type": "object",\r
991 \r
992        "properties": {\r
993 \r
994          "cpInstanceId": {\r
995 \r
996            "type": "string"\r
997 \r
998          },\r
999 \r
1000          "cpInstanceName": {\r
1001 \r
1002            "type": "string"\r
1003 \r
1004          },\r
1005 \r
1006          "cpdId": {\r
1007 \r
1008            "type": "string"\r
1009 \r
1010          }\r
1011 \r
1012        }\r
1013 \r
1014      },\r
1015      "vnffgInfo": {\r
1016 \r
1017        "type": "object",\r
1018 \r
1019        "properties": {\r
1020 \r
1021          "vnffgInstanceId": {\r
1022 \r
1023            "type": "string"\r
1024 \r
1025          },\r
1026 \r
1027          "vnfId": {\r
1028 \r
1029            "type": "string"\r
1030 \r
1031          },\r
1032          "pnfId": {\r
1033 \r
1034            "type": "string"\r
1035 \r
1036          },\r
1037 \r
1038          "virtualLinkId": {\r
1039 \r
1040            "type": "string"\r
1041 \r
1042          },\r
1043 \r
1044          "cpId": {\r
1045 \r
1046            "type": "string"\r
1047 \r
1048          },\r
1049 \r
1050          "nfp": {\r
1051 \r
1052            "type": "string"\r
1053 \r
1054          }\r
1055 \r
1056        }\r
1057 \r
1058      }\r
1059 \r
1060    }\r
1061 \r
1062  }