/v2/compute/projects/{project_id}/cloud/nodes/{node_id}¶
Contents
GET /v2/compute/projects/{project_id}/cloud/nodes/{node_id}¶
Get a cloud instance
Parameters¶
- node_id: Node UUID
- project_id: Project 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/b81b6f71-e77e-4b7b-8db9-916d4fa832e3'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/b81b6f71-e77e-4b7b-8db9-916d4fa832e3 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 1608
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:52 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}
{
"interfaces": [
{
"name": "docker0",
"special": true,
"type": "ethernet"
},
{
"name": "lo",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0-nic",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet1",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet2",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet3",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet4",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp58s0",
"special": false,
"type": "ethernet"
}
],
"name": "Cloud 1",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/builtin/b81b6f71-e77e-4b7b-8db9-916d4fa832e3",
"node_id": "b81b6f71-e77e-4b7b-8db9-916d4fa832e3",
"ports_mapping": [
{
"interface": "wlp58s0",
"name": "wlp58s0",
"port_number": 0,
"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¶
- node_id: Node UUID
- project_id: Project 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 |
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/f7f02c3a-77a4-4c7f-a36c-afa04af08e8f' -d '{"name": "test"}'
PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/f7f02c3a-77a4-4c7f-a36c-afa04af08e8f HTTP/1.1
{
"name": "test"
}
HTTP/1.1 200
Connection: close
Content-Length: 1605
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:34:53 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}
{
"interfaces": [
{
"name": "docker0",
"special": true,
"type": "ethernet"
},
{
"name": "lo",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0",
"special": true,
"type": "ethernet"
},
{
"name": "virbr0-nic",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet1",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet2",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet3",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet4",
"special": true,
"type": "ethernet"
},
{
"name": "vmnet8",
"special": true,
"type": "ethernet"
},
{
"name": "wlp58s0",
"special": false,
"type": "ethernet"
}
],
"name": "test",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_json4/project-files/builtin/f7f02c3a-77a4-4c7f-a36c-afa04af08e8f",
"node_id": "f7f02c3a-77a4-4c7f-a36c-afa04af08e8f",
"ports_mapping": [
{
"interface": "wlp58s0",
"name": "wlp58s0",
"port_number": 0,
"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¶
- node_id: Node UUID
- project_id: Project UUID
Response status codes¶
- 400: Invalid request
- 404: Instance doesn’t exist
- 204: Instance deleted
Sample session¶
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/f95094c7-e60b-494a-9e2e-1029e8ba7520'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/f95094c7-e60b-494a-9e2e-1029e8ba7520 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:34:53 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}