/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_device✔stringEthernet device name e.g. eth0
type✔enumPossible values: nio_generic_ethernet
LinuxEthernet

Linux Ethernet Network Input/Output

NameMandatoryTypeDescription
ethernet_device✔stringEthernet device name e.g. eth0
type✔enumPossible values: nio_linux_ethernet
NULL

NULL Network Input/Output

NameMandatoryTypeDescription
type✔enumPossible values: nio_null
TAP

TAP Network Input/Output

NameMandatoryTypeDescription
tap_device✔stringTAP device name e.g. tap0
type✔enumPossible values: nio_tap
UDP

UDP Network Input/Output

NameMandatoryTypeDescription
lport✔integerLocal port
rhost✔stringRemote host
rport✔integerRemote port
type✔enumPossible values: nio_udp
UNIX

UNIX Network Input/Output

NameMandatoryTypeDescription
local_file✔stringpath to the UNIX socket file (local)
remote_file✔stringpath to the UNIX socket file (remote)
type✔enumPossible values: nio_unix
VDE

VDE Network Input/Output

NameMandatoryTypeDescription
control_file✔stringpath to the VDE control file
local_file✔stringpath to the VDE control file
type✔enumPossible values: nio_vde

Body

NameMandatoryTypeDescription
id✔integerVPCS device instance ID
nio✔UDP, Ethernet, LinuxEthernet, TAP, UNIX, VDE, NULLNetwork Input/Output
port✔integerPort number
port_id✔integerUnique port identifier for the VPCS instance

Sample session

curl -i -X POST 'http://localhost:8000/vpcs/{uuid}/nio' -d '{"id": 42, "nio": {"local_file": "/tmp/test", "remote_file": "/tmp/remote", "type": "nio_unix"}, "port": 0, "port_id": 0}'

POST /vpcs/{uuid}/nio HTTP/1.1
{
    "uuid": "a62d5f09-7093-4b42-ac2f-841dbcb8c3c7,
    "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: 62
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 aiohttp/0.13.1
X-ROUTE: /vpcs/{uuid}/nio

{
    "console": 4242,
    "name": "PC 2",
    "uuid": "a62d5f09-7093-4b42-ac2f-841dbcb8c3c7"
}

Table Of Contents

Previous topic

/vpcs/{vpcs_id}