Add swagger for server action api 83/61783/4
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 22 Aug 2018 06:34:33 +0000 (14:34 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Thu, 23 Aug 2018 02:54:23 +0000 (10:54 +0800)
Change-Id: I2bc9ca0f94f625a01c123fe2dc2b7044cce06ba6
Issue-ID: MULTICLOUD-332
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
multivimbroker/multivimbroker/swagger/multivim.server.swagger.json

index f54b481..7f949aa 100644 (file)
                     }
                 }
             }
+        },
+        "/{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": {
                     "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"
+                        }
+                    }
+                }
+            }
         }
     }
 }

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use