summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-23 17:19:10 +0800
committerBin Yang <bin.yang@windriver.com>2018-08-23 14:34:55 +0000
commitd7422ca9097c3fca3bd02f187fbfb5ca7a898e84 (patch)
treef56dfb44926e855992ebcdd145e8d6971b8a8e73
parentd69c1e4d232aae8f01fe4aeca1321447bf694cf4 (diff)
Add swagger for server action api
Change-Id: I45790cb319a10f2a8a1a667e786522082c59c22d Issue-ID: MULTICLOUD-332 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--share/newton_base/swagger/multivim.server.swagger.json82
1 files changed, 82 insertions, 0 deletions
diff --git a/share/newton_base/swagger/multivim.server.swagger.json b/share/newton_base/swagger/multivim.server.swagger.json
index c309a394..3a9d8e45 100644
--- a/share/newton_base/swagger/multivim.server.swagger.json
+++ b/share/newton_base/swagger/multivim.server.swagger.json
@@ -231,6 +231,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": {
@@ -483,6 +542,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"
+ }
+ }
+ }
+ }
}
}
}