Modify swagger file of gvnfm-vnfmgr
authorying.yunlong <ying.yunlong@zte.com.cn>
Sat, 25 Feb 2017 04:59:55 +0000 (12:59 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Sat, 25 Feb 2017 04:59:55 +0000 (12:59 +0800)
Change-Id: I8e9ba1085bec8cd7686154bc4b9005d272114cac
Issue-Id: GVNFM-34
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
.gitignore
mgr/mgr/swagger/swagger.json

index 6991837..3df64fc 100644 (file)
@@ -1,8 +1,4 @@
-target/
-coverage-report/
-bin/
-.project
-.settings
-.classpath
-.class
-.checkstyle
+mgr/.idea
+mgr/logs/runtime_mgr.log
+*.pyc
+
index c977fbd..552d26f 100644 (file)
 {
-    "swagger": "2.0",
-    "info": {
-        "version": "1.0.0",
-        "title": "VNF Mgr Service rest API"
-    },
-    "basePath": "/openoapi/vnfmgr/v1",
-    "tags": [
-        {
-            "name": "vnfmgr"
-        }
-    ],
-    "paths": {
+  "swagger": "2.0",
+  "info": {
+    "version": "1.0.0",
+    "title": "VNF Mgr Service rest API"
+  },
+  "basePath": "/openoapi/vnfmgr/v1",
+  "tags": [
+    {
+      "name": "vnfmgr"
     }
+  ],
+  "paths": {
+    "/vnfs": {
+      "post": {
+        "tags": [
+          "vnfReg Resource"
+        ],
+        "summary": "save the specified vnfReg info",
+        "description": "",
+        "operationId": "save_vnfReg",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "description": "request parameters",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/VnfRegRequestParams"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "successful operation",
+            "schema": {
+              "$ref": "#/definitions/saveVnfRegInfo"
+            }
+          },
+          "404": {
+            "description": "the vnf instance id is wrong"
+          },
+          "500": {
+            "description": "the url is invalid"
+          }
+        }
+      }
+    },
+    "/vnfs/{vnfInstId}": {
+      "get": {
+        "tags": [
+          "vnfReg Resource"
+        ],
+        "summary": "query the specified vnfReg info",
+        "description": "",
+        "operationId": "query_vnfReg",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "vnfInstId",
+            "in": "path",
+            "description": "vnf instance id",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "schema": {
+              "$ref": "#/definitions/VnfRegInfo"
+            }
+          },
+          "404": {
+            "description": "the vnf instance id is wrong"
+          },
+          "500": {
+            "description": "the url is invalid"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "vnf Resource"
+        ],
+        "summary": "save the specified vnf info",
+        "description": "",
+        "operationId": "save_vnf",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "description": "request parameters",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/VnfRegRequestParams"
+            }
+          }
+        ],
+        "responses": {
+          "202": {
+            "description": "successful operation",
+            "schema": {
+              "$ref": "#/definitions/saveVnfInfo"
+            }
+          },
+          "404": {
+            "description": "the vnf instance id is wrong"
+          },
+          "500": {
+            "description": "the url is invalid"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "vnf Resource"
+        ],
+        "summary": "delete the specified vnf info",
+        "description": "",
+        "operationId": "delete_vnf",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "vnfInstId",
+            "in": "path",
+            "description": "vnf instance id",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "successful operation",
+            "schema": {
+              "$ref": "#/definitions/deleteVnfInfo"
+            }
+          },
+          "404": {
+            "description": "the vnf instance id is wrong"
+          },
+          "500": {
+            "description": "the url is invalid"
+          }
+        }
+      }
+    },
+    "/configuration": {
+      "post": {
+        "tags": [
+          "vnf Resource"
+        ],
+        "summary": "config the specified vnf info",
+        "description": "",
+        "operationId": "config_vnf",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "description": "request data",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/VnfRequestParams"
+            }
+          }
+        ],
+        "responses": {
+          "202": {
+            "description": "successful operation",
+            "schema": {
+              "$ref": "#/definitions/configVnfInfo"
+            }
+          },
+          "404": {
+            "description": "the vnf instance id is wrong"
+          },
+          "500": {
+            "description": "the url is invalid"
+          }
+        }
+      }
+    }
+  },
+  "definitions": {
+    "VnfRegRequestParams": {
+      "type": "object",
+      "properties": {
+        "vnfInstId": {
+          "type": "string"
+        },
+        "ip": {
+          "type": "string"
+        },
+        "port": {
+          "type": "string"
+        },
+        "username": {
+          "type": "string"
+        },
+        "password": {
+          "type": "string"
+        }
+      }
+    },
+    "saveVnfRegInfo": {
+      "type": "object",
+      "properties": {}
+    },
+    "VnfRegInfo": {
+      "type": "object",
+      "properties": {
+        "vnfInstId": {
+          "type": "string"
+        },
+        "ip": {
+          "type": "string"
+        },
+        "port": {
+          "type": "string"
+        },
+        "username": {
+          "type": "string"
+        },
+        "password": {
+          "type": "string"
+        }
+      }
+    },
+    "saveVnfInfo": {
+      "type": "object"
+    },
+    "deleteVnfInfo": {
+      "type": "object"
+    },
+    "VnfRequestParams": {
+      "type": "object",
+      "properties": {
+        "vnfInstanceId": {
+          "type": "string"
+        },
+        "vnfConfigurationData": {
+          "type": "object",
+          "properties": {
+            "cp": {
+              "type": "array",
+              "items": {
+                "type": "object"
+              }
+            },
+            "vnfSpecificData": {
+              "type": "object",
+              "properties": {
+                "autoScalable": {
+                  "type": "string"
+                },
+                "autoHealable": {
+                  "type": "string"
+                }
+              }
+            }
+          }
+        },
+        "vnfcConfigurationData": {
+          "type": "object",
+          "properties": {
+            "vnfcId": {
+              "type": "string"
+            },
+            "cp": {
+              "type": "array",
+              "items": {
+                "cpId": {
+                  "type": "string"
+                },
+                "cpdId": {
+                  "type": "string"
+                },
+                "cpAddress": {
+                  "type": "array",
+                  "items": {
+                    "type": "object"
+                  }
+                }
+              }
+            },
+            "vnfcSpecificData": {}
+          }
+        }
+      }
+    },
+    "configVnfInfo": {
+      "type": "object",
+      "properties": {
+        "vnfConfigurationData": {
+          "cp": {
+            "type": "array",
+            "items": {
+              "type": "object"
+            }
+          },
+          "vnfSpecificData": {
+            "type": "object",
+            "properties": {
+              "autoScalable": {
+                "type": "string"
+              },
+              "autoHealable": {
+                "type": "string"
+              }
+            }
+          }
+        },
+        "vnfcConfigurationData": {
+          "type": "object",
+          "properties": {
+            "vnfcId": {
+              "type": "string"
+            },
+            "cp": {
+              "type": "array",
+              "items": {
+                "type": "object"
+              }
+            },
+            "vnfcSpecificData": {
+              "type": "object"
+            }
+          }
+        }
+      }
+    }
+  }
 }
\ No newline at end of file