/v2/compute/projects/{project_id}/cloud/nodes/{node_id}

GET /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Get a cloud instance

Parameters

  • project_id: Project UUID
  • node_id: Node UUID

Response status codes

  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist

Output

Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended

Sample session

curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/689c58e7-9112-4d4f-b5ea-37c5b478c332'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/689c58e7-9112-4d4f-b5ea-37c5b478c332 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 3855
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

{
    "interfaces": [
        {
            "name": "bridge0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "en0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en1",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en2",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "fw0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "lo0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "p2p0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "utun0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "vboxnet0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet10",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet8",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet9",
            "special": true,
            "type": "ethernet"
        }
    ],
    "name": "Cloud 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/builtin/689c58e7-9112-4d4f-b5ea-37c5b478c332",
    "node_id": "689c58e7-9112-4d4f-b5ea-37c5b478c332",
    "ports_mapping": [
        {
            "interface": "en0",
            "name": "en0",
            "port_number": 0,
            "type": "ethernet"
        },
        {
            "interface": "en1",
            "name": "en1",
            "port_number": 1,
            "type": "ethernet"
        },
        {
            "interface": "en2",
            "name": "en2",
            "port_number": 2,
            "type": "ethernet"
        },
        {
            "interface": "utun0",
            "name": "utun0",
            "port_number": 3,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}

PUT /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Update a cloud instance

Parameters

  • project_id: Project UUID
  • node_id: Node UUID

Response status codes

  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict

Input

Types

HostInterfaces

Interfaces on this host

Name Mandatory Type Description
name ✔ string Interface name
special ✔ boolean If true the interface is non standard (firewire for example)
type ✔ enum Possible values: ethernet, tap

Body

Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended

Output

Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended

Sample session

curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/35d71fe5-356d-440e-a170-d88e35258f06' -d '{"name": "test"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/35d71fe5-356d-440e-a170-d88e35258f06 HTTP/1.1
{
    "name": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 3852
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:41 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

{
    "interfaces": [
        {
            "name": "bridge0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "en0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en1",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en2",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "fw0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "lo0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "p2p0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "utun0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "vboxnet0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet10",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet8",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet9",
            "special": true,
            "type": "ethernet"
        }
    ],
    "name": "test",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/builtin/35d71fe5-356d-440e-a170-d88e35258f06",
    "node_id": "35d71fe5-356d-440e-a170-d88e35258f06",
    "ports_mapping": [
        {
            "interface": "en0",
            "name": "en0",
            "port_number": 0,
            "type": "ethernet"
        },
        {
            "interface": "en1",
            "name": "en1",
            "port_number": 1,
            "type": "ethernet"
        },
        {
            "interface": "en2",
            "name": "en2",
            "port_number": 2,
            "type": "ethernet"
        },
        {
            "interface": "utun0",
            "name": "utun0",
            "port_number": 3,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}

DELETE /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Delete a cloud instance

Parameters

  • project_id: Project UUID
  • node_id: Node UUID

Response status codes

  • 204: Instance 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/cloud/nodes/eeee4a80-b66d-4865-b9e6-92582712210c'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/eeee4a80-b66d-4865-b9e6-92582712210c HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}