/v2/compute/projects/{project_id}/docker/nodes/{node_id}¶
Contents
DELETE /v2/compute/projects/{project_id}/docker/nodes/{node_id}¶
Delete a Docker container
Parameters¶
- project_id: Project UUID
- node_id: Node UUID
Response status codes¶
- 204: Instance deleted
- 400: Invalid request
- 404: Instance doesn’t exist
PUT /v2/compute/projects/{project_id}/docker/nodes/{node_id}¶
Update a Docker 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¶
Name | Mandatory | Type | Description |
---|---|---|---|
adapters | ['integer', 'null'] | number of adapters | |
aux | integer | Auxiliary TCP port | |
console | ['integer', 'null'] | Console TCP port | |
console_http_path | string | Path of the web interface | |
console_http_port | integer | Internal port in the container for the HTTP server | |
console_resolution | string | Console resolution for VNC | |
console_type | enum | Possible values: telnet, vnc, http, https, none | |
container_id | string | Docker container ID Read only | |
custom_adapters | array | ||
environment | ['string', 'null'] | Docker environment | |
extra_hosts | ['string', 'null'] | Docker extra hosts (added to /etc/hosts) | |
extra_volumes | array | Additional directories to make persistent | |
image | string | Docker image name Read only | |
name | string | Docker container name | |
node_directory | string | Path to the node working directory Read only | |
node_id | string | Node UUID | |
project_id | string | Project UUID Read only | |
start_command | ['string', 'null'] | Docker CMD entry | |
status | enum | Possible values: started, stopped, suspended | |
usage | string | How to use the Docker container |
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
adapters | ['integer', 'null'] | number of adapters | |
aux | integer | Auxiliary TCP port | |
console | ['integer', 'null'] | Console TCP port | |
console_http_path | string | Path of the web interface | |
console_http_port | integer | Internal port in the container for the HTTP server | |
console_resolution | string | Console resolution for VNC | |
console_type | enum | Possible values: telnet, vnc, http, https, none | |
container_id | string | Docker container ID Read only | |
custom_adapters | array | ||
environment | ['string', 'null'] | Docker environment | |
extra_hosts | ['string', 'null'] | Docker extra hosts (added to /etc/hosts) | |
extra_volumes | array | Additional directories to make persistent | |
image | string | Docker image name Read only | |
name | string | Docker container name | |
node_directory | string | Path to the node working directory Read only | |
node_id | string | Node UUID | |
project_id | string | Project UUID Read only | |
start_command | ['string', 'null'] | Docker CMD entry | |
status | enum | Possible values: started, stopped, suspended | |
usage | string | How to use the Docker container |
Sample session¶
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/1a59fa68-aef8-4220-9262-01d2063817a0' -d '{"console": 5006, "environment": "GNS3=1\nGNS4=0", "extra_hosts": "test:127.0.0.1", "name": "test", "start_command": "yes"}'
PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/1a59fa68-aef8-4220-9262-01d2063817a0 HTTP/1.1
{
"console": 5006,
"environment": "GNS3=1\nGNS4=0",
"extra_hosts": "test:127.0.0.1",
"name": "test",
"start_command": "yes"
}
HTTP/1.1 200
Connection: close
Content-Length: 681
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:25:51 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}
{
"adapters": 2,
"aux": 5005,
"console": 5006,
"console_http_path": "/",
"console_http_port": 80,
"console_resolution": "1280x1024",
"console_type": "telnet",
"container_id": "8bd8153ea8f5",
"environment": "GNS3=1\nGNS4=0",
"extra_hosts": "test:127.0.0.1",
"extra_volumes": [],
"image": "nginx:latest",
"name": "test",
"node_directory": "/tmp/pytest-of-grossmj/pytest-41/test_json4/project-files/docker/1a59fa68-aef8-4220-9262-01d2063817a0",
"node_id": "1a59fa68-aef8-4220-9262-01d2063817a0",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"start_command": "yes",
"status": "stopped",
"usage": ""
}