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