/v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

POST /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a Docker container

Parameters

  • project_id: Project UUID

  • node_id: Node UUID

  • adapter_number: Adapter where the nio should be added

  • port_number: Port on the adapter (always 0)

Response status codes

  • 201: NIO created

  • 400: Invalid request

  • 404: Instance doesn’t exist

Sample session

curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/bfba66b2-35db-441e-8015-3041cf886105/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/bfba66b2-35db-441e-8015-3041cf886105/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}

PUT /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Update a NIO on a Docker instance

Parameters

  • project_id: Project UUID

  • node_id: Node UUID

  • adapter_number: Network adapter where the nio is located

  • port_number: Port from where the nio should be updated (always 0)

Response status codes

  • 201: NIO updated

  • 400: Invalid request

  • 404: Instance doesn’t exist

Sample session

curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/9b43ae00-f03f-4159-93a5-6ca82de77bdd/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/9b43ae00-f03f-4159-93a5-6ca82de77bdd/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}

DELETE /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a Docker container

Parameters

  • project_id: Project UUID

  • node_id: Node UUID

  • adapter_number: Adapter where the nio should be added

  • port_number: Port on the adapter (always 0)

Response status codes

  • 204: NIO deleted

  • 400: Invalid request

  • 404: Instance doesn’t exist

Sample session

curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5e6e56f-2698-4bae-9365-0a9f9efd3418/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c5e6e56f-2698-4bae-9365-0a9f9efd3418/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 08 Jan 2020 02:25:50 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio