summaryrefslogtreecommitdiffstats
path: root/newton/newton/swagger/multivim.vport.swagger.json
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-02-22 12:58:11 +0800
committerBin Yang <bin.yang@windriver.com>2017-02-22 14:43:31 +0800
commit394cf8e3619ec4ddab4adf1608336feb39c1c6fb (patch)
tree33ee6d773ff7620c761390fa5165e3d2dbd51655 /newton/newton/swagger/multivim.vport.swagger.json
parentcff3fa9ea142ee496eb80a2db1204e9fe2d98e1d (diff)
Setup micro-service of newton driver
Change-Id: I86dd5d3032eb70d0c1c1c23d179de2a0a2a1fdeb Issue-Id: MULTIVIM-18 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton/newton/swagger/multivim.vport.swagger.json')
-rw-r--r--newton/newton/swagger/multivim.vport.swagger.json378
1 files changed, 378 insertions, 0 deletions
diff --git a/newton/newton/swagger/multivim.vport.swagger.json b/newton/newton/swagger/multivim.vport.swagger.json
new file mode 100644
index 00000000..f722c26f
--- /dev/null
+++ b/newton/newton/swagger/multivim.vport.swagger.json
@@ -0,0 +1,378 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "version": "1.0.0",
+ "title": "MultiVIM Service rest API"
+ },
+ "basePath": "/openoapi/multivim/v1/",
+ "tags": [
+ {
+ "name": "MultiVIM broker"
+ }
+ ],
+ "paths": {
+ "/{vimid}/{tenantid}/ports": {
+ "post": {
+ "tags": [
+ "vim virtual ports"
+ ],
+ "summary": "create a virtual port",
+ "description": "create a virtual port",
+ "operationId": "create_vim_port",
+ "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"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "create vim virtual port request param",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateVimPort"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "schema": {
+ "$ref": "#/definitions/VimPortInfo"
+ }
+ },
+ "404": {
+ "description": "the vim id or tenant UUID is wrong"
+ },
+ "500": {
+ "description": "the vim virtual port is not accessable"
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "vim virtual ports"
+ ],
+ "summary": "query vim ports list",
+ "description": "query vim ports list",
+ "operationId": "query_vim_ports",
+ "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"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "get a list of vim virtual ports request param",
+ "required": false,
+ "schema": {
+ "$ref": "#/definitions/ListVimPorts"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "schema": {
+ "$ref": "#/definitions/VimPortsInfo"
+ }
+ },
+ "404": {
+ "description": "the vim id or tenant UUID is wrong"
+ },
+ "500": {
+ "description": "the vim virtual port is not accessable"
+ }
+ }
+ }
+ },
+ "/{vimid}/{tenantid}/ports/{portid}": {
+ "delete": {
+ "tags": [
+ "vim virtual ports"
+ ],
+ "summary": "delete specific vim virtual port",
+ "description": "delete specific vim virtual port",
+ "operationId": "delete_vim_port",
+ "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": "portid",
+ "in": "path",
+ "description": "vim virtual port id",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "successful operation"
+ },
+ "404": {
+ "description": "the vim id or tenant UUID is wrong"
+ },
+ "500": {
+ "description": "the virtual port is not accessable"
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "vim virtual ports"
+ ],
+ "summary": "query specific vim virtual port",
+ "description": "query specific vim virtual port",
+ "operationId": "query_vim_port",
+ "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": "portid",
+ "in": "path",
+ "description": "vim virtual port id",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "schema": {
+ "$ref": "#/definitions/VimPortInfo"
+ }
+ },
+ "404": {
+ "description": "the vim id or tenant UUID is wrong"
+ },
+ "500": {
+ "description": "the vim virtual port id is not accessable"
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "CreateVimPort": {
+ "type": "object",
+ "required": [
+ "networkId",
+ "subnetId",
+ "name",
+ "cidr",
+ "ipVersion"
+ ],
+ "properties": {
+ "networkId": {
+ "type": "string",
+ "description": "network UUID"
+ },
+ "subnetId": {
+ "type": "string",
+ "description": "subnet UUID"
+ },
+ "name": {
+ "type": "string",
+ "description": "virtual port name"
+ },
+ "ip": {
+ "type": "string",
+ "description": "virtual port fixed IP"
+ },
+ "macAddress": {
+ "type": "string",
+ "description": "virtual port MAC address"
+ },
+ "vnicType": {
+ "type": "string",
+ "description": "vnicType: normal,direct,macvtap"
+ },
+ "securityGroups": {
+ "type": "array",
+ "description": "List of security group names",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "ListVimPorts": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "virtual port name"
+ }
+ }
+ },
+ "VimPortsInfo": {
+ "type": "object",
+ "required": [
+ "vimId",
+ "tenantId",
+ "ports"
+ ],
+ "properties": {
+ "vimId": {
+ "type": "string"
+ },
+ "vimName": {
+ "type": "string"
+ },
+ "tenantId": {
+ "type": "string",
+ "description": "tenant UUID"
+ },
+ "ports": {
+ "type": "array",
+ "description": "ports information",
+ "items": {
+ "$ref": "#/definitions/VimPortInfo"
+ }
+ }
+ }
+ },
+ "VimPortInfo": {
+ "type": "object",
+ "required": [
+ "name",
+ "status",
+ "id",
+ "networkId",
+ "subnetId"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "virtual port name"
+ },
+ "id": {
+ "type": "string",
+ "description": "virtual port UUID"
+ },
+ "status": {
+ "type": "string",
+ "description": "subnet status"
+ },
+ "networkId": {
+ "type": "string",
+ "description": "network UUID"
+ },
+ "networkName": {
+ "type": "string",
+ "description": "network name"
+ },
+ "subnetName": {
+ "type": "string",
+ "description": "subnet name"
+ },
+ "subnetId": {
+ "type": "string",
+ "description": "subnet UUID"
+ },
+ "ip": {
+ "type": "string",
+ "description": "virtual port fixed IP"
+ },
+ "macAddress": {
+ "type": "string",
+ "description": "virtual port MAC address"
+ },
+ "vnicType": {
+ "type": "string",
+ "description": "vnicType: normal,direct,macvtap"
+ },
+ "securityGroups": {
+ "type": "array",
+ "description": "list of securityGroups names",
+ "items": {
+ "type": "string"
+ }
+ },
+ "vimId": {
+ "type": "string"
+ },
+ "vimName": {
+ "type": "string"
+ },
+ "tenantId": {
+ "type": "string",
+ "description": "tenant UUID"
+ },
+ "returnCode": {
+ "type": "integer",
+ "description": "0: Already exist 1: Newly created"
+ }
+ }
+ }
+ }
+}