summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-08-23 08:47:56 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-23 08:47:56 +0000
commit737457599e5e2cd5e93c2cdb59a244daf687d54a (patch)
treecbdf1e6a8e7459ab44088d03339dffcd2ca0dec2 /multivimbroker
parent0502b3b6dce5b58ea6601f0658c400c619136b0f (diff)
parent3c0fb621b5e0f7376946e117a9e9d85498d8198e (diff)
Merge "Add swagger for server action api"
Diffstat (limited to 'multivimbroker')
-rw-r--r--multivimbroker/multivimbroker/swagger/multivim.server.swagger.json82
1 files changed, 82 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json b/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json
index f54b481..7f949aa 100644
--- a/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json
+++ b/multivimbroker/multivimbroker/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"
+ }
+ }
+ }
+ }
}
}
}