Merge "Add post deal of build-in workflow"
[vfc/nfvo/lcm.git] / lcm / ns / swagger.json
index 2664027..e8a1f38 100644 (file)
     "swagger": "2.0",
     "info": {
         "version": "1.0.0",
-        "title": "ZTE vManager Service rest API"
+        "title": "ONAP VFC Service Rest API"
     },
-    "basePath": "/openoapi/nslcm/v1",
+    "basePath": "/api/nslcm/v1",
     "tags": [
         {
-            "name": "lcm Resource"
+            "name": "vfc nslcm resource"
         }
     ],
     "paths": {
+        "/nspackage": {
+            "post": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "ns package distribute",
+                "description": "ns package distribute",
+                "operationId": "ns_pkg_distribute",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "in": "body",
+                        "name": "body",
+                        "description": "distribute request param",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostRequest"
+                        }
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            }
+        },
+        "/nspackage/{csarId}": {
+            "get": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "query one ns package info",
+                "description": "query one ns package info",
+                "operationId": "query_one_ns_package",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of ns package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "successful operation",
+                        "schema": {
+                            "$ref": "#/definitions/NsPackageInfo"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            },
+            "delete": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "delete ns pkg",
+                "description": "delete ns pkg",
+                "operationId": "delete_ns_pkg",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of ns package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            }
+        },
+        "/vnfpackage": {
+            "get": {
+                "tags": [
+                    "nf package Resource"
+                ],
+                "summary": "query nf package info",
+                "description": "query nf package info",
+                "operationId": "query_nf_package",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                ],
+                "responses": {
+                    "200": {
+                        "description": "successful operation",
+                        "schema": {
+                            "$ref": "#/definitions/NfPackageListInfo"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            },
+            "post": {
+                "tags": [
+                    "nf package Resource"
+                ],
+                "summary": "nf package distribute",
+                "description": "nf package distribute",
+                "operationId": "nf_pkg_distribute",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "in": "body",
+                        "name": "body",
+                        "description": "distribute request param",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/NfPkgPostRequest"
+                        }
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NfPkgPostResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            }
+        },
+        "/vnfpackage/{csarId}": {
+            "get": {
+                "tags": [
+                    "nf package Resource"
+                ],
+                "summary": "query one nf package info",
+                "description": "query one nf package info",
+                "operationId": "query_one_nf_package",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of nf package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "successful operation",
+                        "schema": {
+                            "$ref": "#/definitions/NfPackageInfo"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            },
+            "delete": {
+                "tags": [
+                    "nf package Resource"
+                ],
+                "summary": "delete nf pkg",
+                "description": "delete nf pkg",
+                "operationId": "delete_nf_pkg",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of nf package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NfPkgPostResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            }
+        },
         "/ns/vls": {
             "post": {
                 "tags": [
                         "description": "",
                         "name": "nsInstanceId",
                         "in": "path"
-                    },
-                                       {
-                        "required": true,
-                        "type": "Enum",
-                        "description": "",
-                        "name": "scaleType",
-                        "in": "body"
                     },
                     {
                         "in": "body",
-                        "name": "scaleNsData",
-                        "description": "scaleNsData",
+                        "name": "ScaleNSRequest",
+                        "description": "Scale NS Request Body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/ScaleNsData"
+                            "$ref": "#/definitions/ScaleNsRequest"
                         }
                     }
                 ],
                 }
             }
         },
+        "/ns/{ns_instance_id}/heal": {
+            "post": {
+                "tags": [
+                    "ns heal"
+                ],
+                "summary": "ns heal",
+                "description": "ns heal",
+                "operationId": "ns_heal",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "required": true,
+                        "type": "string",
+                        "description": "Identifier of the NS instance.",
+                        "name": "ns_instance_id",
+                        "in": "path"
+                    },
+                    {
+                        "in": "body",
+                        "name": "healVnfData",
+                        "description": "healVnfData",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/healVnfDataRequest"
+                        }
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/healVnfDataResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "the url is invalid"
+                    }
+                }
+            }
+        },
         "/mandb/{modelName}": {
             "get": {
                 "tags": [
         }
     },
     "definitions": {
+        "NsPkgPostRequest": {
+            "type": "object",
+            "properties": {
+                "csarId": {
+                    "type": "string"
+                }
+            }
+        },
+        "NsPkgPostResponse": {
+            "type": "object",
+            "properties": {
+                "status": {
+                    "type": "string"
+                },
+                "statusDescription": {
+                    "type": "string"
+                },
+                "errorCode": {
+                    "type": "string"
+                }
+            }
+        },
+       
+        "NsPackageInfo": {
+            "type": "object",
+            "properties": {
+                "csarId": {
+                    "type": "string"
+                },
+                "packageInfo": {
+                    "$ref": "#/definitions/NsPkgDetailInfo"
+                },
+                "nsInstanceInfo": {
+                    "$ref": "#/definitions/NsInstListInfo"
+                }
+            }
+        },
+        "NsPkgDetailInfo": {
+            "type": "object",
+            "properties": {
+                "nsdId": {
+                    "type": "string"
+                },
+                "nsdProvider": {
+                    "type": "string"
+                },
+                "nsdVersion": {
+                    "type": "string"
+                }
+            }
+        },
+        "NsInstListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
+        "NfPkgPostRequest": {
+            "type": "object",
+            "properties": {
+                "csarId": {
+                    "type": "string"
+                }
+            }
+        },
+        "NfPkgPostResponse": {
+            "type": "object",
+            "properties": {
+                "jobId": {
+                    "type": "string"
+                }
+            }
+        },
+        "NfPackageListInfo": {
+            "type": "object",
+            "properties": {
+                "csars": {
+                    "$ref": "#/definitions/NfPkgListInfo"
+                }
+            }
+        },
+        "NfPkgListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
+        "NfPackageInfo": {
+            "type": "object",
+            "properties": {
+                "csarId": {
+                    "type": "string"
+                },
+                "packageInfo": {
+                    "$ref": "#/definitions/NfPkgDetailInfo"
+                },
+                "imageInfo": {
+                    "$ref": "#/definitions/NfPkgImgInfo"
+                },
+                "vnfInstanceInfo": {
+                    "$ref": "#/definitions/NfInstListInfo"
+                }
+            }
+        },
+        "NfPkgDetailInfo": {
+            "type": "object",
+            "properties": {
+                "vnfdId": {
+                    "type": "string"
+                },
+                "vnfdProvider": {
+                    "type": "string"
+                },
+                "vnfdVersion": {
+                    "type": "string"
+                },
+                "vnfVersion": {
+                    "type": "string"
+                }
+            }
+        },
+        "NfInstListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
+        "NfPkgImgInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
         "VlPostRequest": {
             "type": "object",
             "properties": {
                 }
             }
         },
-        "ScaleNsData": {
+        "ScaleNsRequest": {
             "type": "object",
             "properties": {
+                "scaleType":{
+                    "type": "string"
+                },
                 "scaleNsByStepsData": {
                     "$ref": "#/definitions/ScaleNsByStepsData"
                 }
             "type": "object",
             "properties": {
                 "scalingDirection": {
-                    "type": "Enum"
+                    "type": "string"
                 },
                 "aspectId": {
                     "type": "string"
                 }
             }
         },
+        "healVnfDataRequest": {
+            "type": "object",
+            "properties": {
+                "vnfInstanceId": {
+                    "type": "string"
+                },
+                "cause": {
+                    "type": "string"
+                },
+                "additionalParams": {
+                    "type": "object",
+                    "properties": {
+                        "action": {
+                            "type": "string"
+                        },
+                        "actionvminfo": {
+                            "type": "object",
+                            "properties": {
+                                "vmid": {
+                                    "type": "string"
+                                },
+                                "vmname": {
+                                    "type": "string"
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        "healVnfDataResponse": {
+            "type": "object",
+            "properties": {
+                "jobId": {
+                    "type": "string"
+                }
+            }
+        },
         "TableInfo": {
             "type": "object",
             "properties": {