/vpcs/{vpcs_id}/nio

POST /vpcs/{vpcs_id}/nio

ADD NIO to a VPCS

Parameters

  • vpcs_id: Id of VPCS instance

Response status codes

  • 201: Success of creation of NIO
  • 409: Conflict

Input

Types

Ethernet

Generic Ethernet Network Input/Output

NameMandatoryTypeDescription
ethernet_devicestringEthernet device name e.g. eth0
typeenumPossible values: nio_generic_ethernet
LinuxEthernet

Linux Ethernet Network Input/Output

NameMandatoryTypeDescription
ethernet_devicestringEthernet device name e.g. eth0
typeenumPossible values: nio_linux_ethernet
NULL

NULL Network Input/Output

NameMandatoryTypeDescription
typeenumPossible values: nio_null
TAP

TAP Network Input/Output

NameMandatoryTypeDescription
tap_devicestringTAP device name e.g. tap0
typeenumPossible values: nio_tap
UDP

UDP Network Input/Output

NameMandatoryTypeDescription
lportintegerLocal port
rhoststringRemote host
rportintegerRemote port
typeenumPossible values: nio_udp
UNIX

UNIX Network Input/Output

NameMandatoryTypeDescription
local_filestringpath to the UNIX socket file (local)
remote_filestringpath to the UNIX socket file (remote)
typeenumPossible values: nio_unix
VDE

VDE Network Input/Output

NameMandatoryTypeDescription
control_filestringpath to the VDE control file
local_filestringpath to the VDE control file
typeenumPossible values: nio_vde

Body

NameMandatoryTypeDescription
idintegerVPCS device instance ID
nioUDP, Ethernet, LinuxEthernet, TAP, UNIX, VDE, NULLNetwork Input/Output
portintegerPort number
port_idintegerUnique port identifier for the VPCS instance

Sample session

POST /vpcs/{vpcs_id}/nio HTTP/1.1
{
    "id": 42,
    "nio": {
        "local_file": "/tmp/test",
        "remote_file": "/tmp/remote",
        "type": "nio_unix"
    },
    "port": 0,
    "port_id": 0
}


HTTP/1.1 200
CONNECTION: close
CONTENT-LENGTH: 48
DATE: Thu, 08 Jan 2015 09:33:10 GMT
SERVER: Python/3.4 aiohttp/0.13.1
X-ROUTE: /vpcs/{vpcs_id}/nio

{
    "console": 4242,
    "name": "PC 2",
    "vpcs_id": 42
}