Add additional unit tests and asserts for NS Heal.
[vfc/nfvo/lcm.git] / lcm / ns / swagger.json
index c8262db..6087a92 100644 (file)
@@ -2,12 +2,12 @@
     "swagger": "2.0",
     "info": {
         "version": "1.0.0",
-        "title": "ZTE vManager Service rest API"
+        "title": "ONAP VFC Service Rest API"
     },
     "basePath": "/api/nslcm/v1",
     "tags": [
         {
-            "name": "lcm Resource"
+            "name": "vfc nslcm resource"
         }
     ],
     "paths": {
                         "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"
                     }
                 }
             }
                         "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"
                         }
                     }
                 ],
             "type": "object",
             "properties": {
                 "csars": {
+                    "$ref": "#/definitions/NsPkgListInfo"
+                }
+            }
+        },
+        "NsPkgListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
+        "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"