diff options
author | 2018-08-30 15:21:01 +0800 | |
---|---|---|
committer | 2018-08-30 16:37:34 +0800 | |
commit | 46c65af11119262e4870fdf479c2b9d0e13c6125 (patch) | |
tree | 7a3e7f663f62e3b9fbac5b2123dd0c3877327661 /vio | |
parent | 38997b4ff2a8d566297914c6fb86b43cb38f5e58 (diff) |
Add server action interface for VIO plugin
Change-Id: I176c39b8c2351a2bc67fd7557011c2dfbb5b6edc
Issue-ID: MULTICLOUD-336
Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/swagger/multivim.server.swagger.json | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/vio/vio/swagger/multivim.server.swagger.json b/vio/vio/swagger/multivim.server.swagger.json index bd37954..112c03f 100644 --- a/vio/vio/swagger/multivim.server.swagger.json +++ b/vio/vio/swagger/multivim.server.swagger.json @@ -219,6 +219,65 @@ } } } + }, + "/{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": { @@ -488,6 +547,29 @@ "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" + } + } + } + } } } } |