Add https support for multicloud broker
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / multivim.server.swagger.json
index 27a4906..7f949aa 100644 (file)
@@ -4,7 +4,7 @@
         "version": "1.0.0",
         "title": "MultiVIM Service rest API"
     },
-    "basePath": "/openoapi/multivim/v1/",
+    "basePath": "/api/multicloud/v0/",
     "tags": [
         {
             "name": "MultiVIM services"
                         "type": "string"
                     },
                     {
-                        "in": "body",
-                        "name": "body",
-                        "description": "get a list of vim servers request param",
+                        "name": "name",
+                        "in":  "query",
+                        "description": "server name to filter list",
                         "required": false,
-                        "schema": {
-                            "$ref": "#/definitions/ListVimServers"
-                        }
+                        "type": "string"
+                    },
+                    {
+                        "name": "limit",
+                        "in":  "query",
+                        "description": "Requests a page size of items",
+                        "required": false,
+                        "type": "string"
+                    },
+                    {
+                        "name": "marker",
+                        "in":  "query",
+                        "description": "image ID of the last-seen item",
+                        "required": false,
+                        "type": "string"
                     }
                 ],
                 "responses": {
                     }
                 }
             }
+        },
+        "/{vimid}/{tenantid}/servers/{serverid}/action": {
+            "post": {
+                "tags": [
+                    "vim servers action"
+                ],
+                "summary": "operate a server",
+                "description": "operate a server",
+                "operationId": "operate_vim_server",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "vimid",
+                        "in": "path",
+                        "description": "vim instance id",
+                        "required": true,
+                        "type": "string"
+                    },
+                    {
+                        "name": "tenantid",
+                        "in": "path",
+                        "description": "tenant UUID",
+                        "required": true,
+                        "type": "string"
+                    },
+                    {
+                        "name": "serverid",
+                        "in": "path",
+                        "description": "vim server id",
+                        "required": true,
+                        "type": "string"
+                    },
+                    {
+                        "in": "body",
+                        "name": "body",
+                        "description": "operate vim server request param",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/OperateVimServer"
+                        }
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "successful operation"
+                    },
+                    "404": {
+                        "description": "the vim id, tenant UUID or server id is wrong"
+                    },
+                    "500": {
+                        "description": "the vim server is not accessable"
+                    }
+                }
+            }
         }
     },
     "definitions": {
                 }
             }
         },
-        "ListVimServers": {
-            "type": "object",
-            "properties": {
-                "name": {
-                    "type": "string",
-                    "description": "server name to filter server list"
-                },
-                "limit": {
-                    "type": "integer",
-                    "description": "Requests a page size of items"
-                },
-                "marker": {
-                    "type": "string",
-                    "description": "server ID of the last-seen item"
-                }
-            }
-        },
         "VimServersInfo": {
             "type": "object",
             "required": [
                     "description": "0: Already exist 1: Newly created"
                 }
             }
+        },
+        "OperateVimServer": {
+            "type": "object",
+            "properties": {
+                "os-start": {
+                    "type": "null",
+                    "description": "the action to start a stopped server"
+                },
+                "os-stop": {
+                    "type": "null",
+                    "description": "the action to stop a running server"
+                },
+                "reboot": {
+                    "type": "object",
+                    "description": "The action to reboot a server",
+                    "properties": {
+                        "type": {
+                            "type": "string",
+                            "description": "the type of the reboot action: the valid values are HARD and SOFT"
+                        }
+                    }
+                }
+            }
         }
     }
 }