/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}¶
Contents
GET /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}¶
Get a VPCS 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 |
---|---|---|---|
command_line | ✔ | string | Last command line used by GNS3 to start VPCS |
console | ✔ | integer | Console TCP port |
console_type | ✔ | enum | Possible values: telnet |
name | ✔ | string | VPCS VM name |
node_directory | string | Path to the VM working directory | |
node_id | ✔ | string | Node UUID |
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/vpcs/nodes/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7'
GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7 HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 384
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}
{
"command_line": "",
"console": 5004,
"console_type": "telnet",
"name": "PC TEST 1",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7",
"node_id": "2bb8ee4e-1428-4cbe-bfb3-95c397fbc1d7",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}
PUT /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}¶
Update a VPCS 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¶
Name | Mandatory | Type | Description |
---|---|---|---|
console | ['integer', 'null'] | Console TCP port | |
console_type | enum | Possible values: telnet | |
name | ['string', 'null'] | VPCS VM name |
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
command_line | ✔ | string | Last command line used by GNS3 to start VPCS |
console | ✔ | integer | Console TCP port |
console_type | ✔ | enum | Possible values: telnet |
name | ✔ | string | VPCS VM name |
node_directory | string | Path to the VM working directory | |
node_id | ✔ | string | Node UUID |
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/vpcs/nodes/412e82d1-045a-46c8-9d83-2ae733ebe629' -d '{"console": 5006, "name": "test"}'
PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/412e82d1-045a-46c8-9d83-2ae733ebe629 HTTP/1.1
{
"console": 5006,
"name": "test"
}
HTTP/1.1 200
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}
{
"command_line": "",
"console": 5006,
"console_type": "telnet",
"name": "test",
"node_directory": "/tmp/tmp4zak1_kl/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/412e82d1-045a-46c8-9d83-2ae733ebe629",
"node_id": "412e82d1-045a-46c8-9d83-2ae733ebe629",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"status": "stopped"
}
DELETE /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}¶
Delete a VPCS 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/vpcs/nodes/ffbdfb95-bf03-4183-8a10-9d33f16ac422'
DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/ffbdfb95-bf03-4183-8a10-9d33f16ac422 HTTP/1.1
HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Thu, 14 Jun 2018 08:35:11 GMT
Server: Python/3.5 GNS3/2.1.8dev1
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}