Merge remote-tracking branch 'origin/asyncio' into asyncio

This commit is contained in:
Jeremy committed 2015-02-27 13:27:40 -07:00
commit b55719186e
77 files changed
+319 -574

No files matched your search

@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80'
DELETE /projects/{project_id} HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80 HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ac98c05c-dbf1-4157-8f4c-6a0319a0bcdc'
DELETE /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ac98c05c-dbf1-4157-8f4c-6a0319a0bcdc HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/acf7667f-91d4-4be5-9eec-f453783bb983/adapters/1/ports/0/nio'
DELETE /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/acf7667f-91d4-4be5-9eec-f453783bb983/adapters/1/ports/0/nio HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da298f63-4d5b-44a7-8672-ec6642009725'
DELETE /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da298f63-4d5b-44a7-8672-ec6642009725 HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/75fa07c2-fb3d-4a19-815d-2dee5aa5325c/adapters/1/ports/0/nio'
DELETE /projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/75fa07c2-fb3d-4a19-815d-2dee5aa5325c/adapters/1/ports/0/nio HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c99f4293-b8b1-40a6-8535-014c4afc2fe7/adapters/0/ports/0/nio'
DELETE /projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c99f4293-b8b1-40a6-8535-014c4afc2fe7/adapters/0/ports/0/nio HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/879f1789-bde0-4e64-ac68-f61a9b114347'
DELETE /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/879f1789-bde0-4e64-ac68-f61a9b114347 HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/5238c683-bb17-49f2-8796-a60668fc5955/adapters/0/ports/0/nio'
DELETE /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/5238c683-bb17-49f2-8796-a60668fc5955/adapters/0/ports/0/nio HTTP/1.1
+5 -5
View File
@@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}'
curl -i -X GET 'http://localhost:8000/projects/00010203-0405-0607-0809-0a0b0c0d0e02'
GET /projects/{project_id} HTTP/1.1
GET /projects/00010203-0405-0607-0809-0a0b0c0d0e02 HTTP/1.1
@@ -13,8 +13,8 @@ SERVER: Python/3.4 GNS3/1.3.dev1
X-ROUTE: /v1/projects/{project_id}
{
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpjlh4s0j0",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpjlh4s0j0/00010203-0405-0607-0809-0a0b0c0d0e0f",
"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f",
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpju7ztx9a",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpju7ztx9a/00010203-0405-0607-0809-0a0b0c0d0e02",
"project_id": "00010203-0405-0607-0809-0a0b0c0d0e02",
"temporary": false
}
@@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}'
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c5c0075d-0b10-4401-8bed-d9897814237c'
GET /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c5c0075d-0b10-4401-8bed-d9897814237c HTTP/1.1
@@ -19,9 +19,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
"l1_keepalives": false,
"name": "PC TEST 1",
"nvram": 128,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_get0/iou.bin",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_get0/iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"vm_id": "f75ff9e7-e658-45f7-9021-1651cfed1194"
"vm_id": "c5c0075d-0b10-4401-8bed-d9897814237c"
}
@@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/initial_config'
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f7220f9c-3334-43e3-9ef4-37f09ba6fcab/initial_config'
GET /projects/{project_id}/iou/vms/{vm_id}/initial_config HTTP/1.1
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f7220f9c-3334-43e3-9ef4-37f09ba6fcab/initial_config HTTP/1.1
@@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}'
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/4532d770-23a0-4858-bbab-d8a8b3a17deb'
GET /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/4532d770-23a0-4858-bbab-d8a8b3a17deb HTTP/1.1
@@ -28,7 +28,7 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"ram": 256,
"vm_id": "b41caecc-86fc-4986-a0b2-36892ac8baba"
"vm_id": "4532d770-23a0-4858-bbab-d8a8b3a17deb"
}
@@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}'
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f526503a-8d24-4513-a5e3-1ebf4159aa70'
GET /projects/{project_id}/virtualbox/vms/{vm_id} HTTP/1.1
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f526503a-8d24-4513-a5e3-1ebf4159aa70 HTTP/1.1
@@ -21,6 +21,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
"name": "VMTEST",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"use_any_adapter": false,
"vm_id": "bb20d4fa-f233-400d-af07-2fbdcb337022",
"vm_id": "f526503a-8d24-4513-a5e3-1ebf4159aa70",
"vmname": "VMTEST"
}
@@ -1,12 +1,12 @@
curl -i -X GET 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}'
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f3c227f-86f5-4f54-bc4b-74597744b904'
GET /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f3c227f-86f5-4f54-bc4b-74597744b904 HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 187
CONTENT-LENGTH: 220
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
@@ -17,5 +17,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
"name": "PC TEST 1",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": null,
"vm_id": "1b0843ea-4fcf-4d2a-94e8-bc3b7a92be88"
"startup_script_path": null,
"vm_id": "6f3c227f-86f5-4f54-bc4b-74597744b904"
}
+4 -4
View File
@@ -4,7 +4,7 @@ POST /projects HTTP/1.1
{}
HTTP/1.1 200
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 277
CONTENT-TYPE: application/json
@@ -13,8 +13,8 @@ SERVER: Python/3.4 GNS3/1.3.dev1
X-ROUTE: /v1/projects
{
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpanmwxfqf",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpanmwxfqf/f0f4987c-b1d3-432f-a354-1179d1c727f9",
"project_id": "f0f4987c-b1d3-432f-a354-1179d1c727f9",
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp4s49s4hy",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp4s49s4hy/119348c0-fa80-4386-bf1e-b00755c9c6b4",
"project_id": "119348c0-fa80-4386-bf1e-b00755c9c6b4",
"temporary": false
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/close' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close' -d '{}'
POST /projects/{project_id}/close HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/commit' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit' -d '{}'
POST /projects/{project_id}/commit HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit HTTP/1.1
{}
@@ -1,13 +1,13 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms' -d '{"ethernet_adapters": 0, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"ethernet_adapters": 0, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
POST /projects/{project_id}/iou/vms HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms HTTP/1.1
{
"ethernet_adapters": 0,
"initial_config_content": "hostname test",
"l1_keepalives": true,
"name": "PC TEST 1",
"nvram": 512,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_create_with_params0/iou.bin",
"ram": 1024,
"serial_adapters": 4
}
@@ -28,9 +28,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms
"l1_keepalives": true,
"name": "PC TEST 1",
"nvram": 512,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_create_with_params0/iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 1024,
"serial_adapters": 4,
"vm_id": "20e66cd4-52ef-4ad2-a44e-16bce06fd6f2"
"vm_id": "3c02aa01-46d2-4a62-97d6-dc5829afdf39"
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f758868-46e1-4ef5-accc-f8e939a12471/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f758868-46e1-4ef5-accc-f8e939a12471/adapters/1/ports/0/nio HTTP/1.1
{
"ethernet_device": "eth0",
"type": "nio_generic_ethernet"
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c40daea2-2b38-4d14-a872-13c5f991cbc3/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c40daea2-2b38-4d14-a872-13c5f991cbc3/adapters/0/ports/0/start_capture HTTP/1.1
{
"capture_file_name": "test.pcap",
"data_link_type": "DLT_EN10MB"
@@ -16,5 +16,5 @@ SERVER: Python/3.4 GNS3/1.3.dev1
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpd25gn8du/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
"pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpn_q77wz2/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/550b8f35-e258-4354-a74c-cd35a48c08ed/adapters/0/ports/0/stop_capture' -d '{}'
POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/550b8f35-e258-4354-a74c-cd35a48c08ed/adapters/0/ports/0/stop_capture HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d1b38099-46a3-4405-a354-85faeb76bd0e/reload' -d '{}'
POST /projects/{project_id}/iou/vms/{vm_id}/reload HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d1b38099-46a3-4405-a354-85faeb76bd0e/reload HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/start' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/fc1ea907-eb0b-4857-9ad2-759f780afdb4/start' -d '{}'
POST /projects/{project_id}/iou/vms/{vm_id}/start HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/fc1ea907-eb0b-4857-9ad2-759f780afdb4/start HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0228866f-a286-44e2-9688-a8cab4e75cc3/stop' -d '{}'
POST /projects/{project_id}/iou/vms/{vm_id}/stop HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0228866f-a286-44e2-9688-a8cab4e75cc3/stop HTTP/1.1
{}
@@ -1,10 +1,10 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms' -d '{"hda_disk_image": "hda", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42", "ram": 1024}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "hda", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42", "ram": 1024}'
POST /projects/{project_id}/qemu/vms HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1
{
"hda_disk_image": "hda",
"name": "PC TEST 1",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"ram": 1024
}
@@ -33,7 +33,7 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"ram": 1024,
"vm_id": "3176897a-996a-4020-86b8-3cd7a0031cbc"
"vm_id": "4e47d2c8-d591-4508-9c3e-00e366f7c22d"
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4ac8960-f709-4e28-bc6c-3b2593b622e9/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
POST /projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4ac8960-f709-4e28-bc6c-3b2593b622e9/adapters/1/ports/0/nio HTTP/1.1
{
"ethernet_device": "eth0",
"type": "nio_generic_ethernet"
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2a143130-2445-4a4b-9ba2-f49071eed5f4/reload' -d '{}'
POST /projects/{project_id}/qemu/vms/{vm_id}/reload HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2a143130-2445-4a4b-9ba2-f49071eed5f4/reload HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/resume' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/9272bffc-7a73-449a-aa71-96c48b1e5a3d/resume' -d '{}'
POST /projects/{project_id}/qemu/vms/{vm_id}/resume HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/9272bffc-7a73-449a-aa71-96c48b1e5a3d/resume HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/start' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4f04682-d749-49c8-be3e-8c4752483cc1/start' -d '{}'
POST /projects/{project_id}/qemu/vms/{vm_id}/start HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4f04682-d749-49c8-be3e-8c4752483cc1/start HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1cb28121-2b13-4c53-a0fc-ab8c6d028d0f/stop' -d '{}'
POST /projects/{project_id}/qemu/vms/{vm_id}/stop HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1cb28121-2b13-4c53-a0fc-ab8c6d028d0f/stop HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/suspend' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/777077ba-025a-49dc-9773-cedc425bdb6d/suspend' -d '{}'
POST /projects/{project_id}/qemu/vms/{vm_id}/suspend HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/777077ba-025a-49dc-9773-cedc425bdb6d/suspend HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'
POST /projects/{project_id}/virtualbox/vms HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms HTTP/1.1
{
"linked_clone": false,
"name": "VM1",
@@ -25,6 +25,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms
"name": "VM1",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"use_any_adapter": false,
"vm_id": "8f384969-8478-4e8a-a6cd-c91376ccc89b",
"vm_id": "1404a6c5-c0f5-4bc6-bb94-477d7e631781",
"vmname": "VM1"
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bd0d175c-2055-4315-86d1-07494696d42e/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bd0d175c-2055-4315-86d1-07494696d42e/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4c9fdef4-8990-44a1-8a98-1b7c510821ee/reload' -d '{}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/reload HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4c9fdef4-8990-44a1-8a98-1b7c510821ee/reload HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/resume' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f6487814-a3a9-4e82-867c-83662c7bed48/resume' -d '{}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/resume HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f6487814-a3a9-4e82-867c-83662c7bed48/resume HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/start' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bedd61d4-b264-47d9-b290-920d5ba70f6d/start' -d '{}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/start HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bedd61d4-b264-47d9-b290-920d5ba70f6d/start HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a1960146-9be9-4f54-b594-67a6ab40f436/stop' -d '{}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/stop HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a1960146-9be9-4f54-b594-67a6ab40f436/stop HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/suspend' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4d16597f-fa75-430a-9b94-faf7f93bb0a3/suspend' -d '{}'
POST /projects/{project_id}/virtualbox/vms/{vm_id}/suspend HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4d16597f-fa75-430a-9b94-faf7f93bb0a3/suspend HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms' -d '{"name": "PC TEST 1"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms' -d '{"name": "PC TEST 1"}'
POST /projects/{project_id}/vpcs/vms HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms HTTP/1.1
{
"name": "PC TEST 1"
}
@@ -8,7 +8,7 @@ POST /projects/{project_id}/vpcs/vms HTTP/1.1
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 187
CONTENT-LENGTH: 220
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
@@ -19,5 +19,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms
"name": "PC TEST 1",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": null,
"vm_id": "90e4cc09-4013-4e94-97ce-3ca48676de22"
"startup_script_path": null,
"vm_id": "b0d1df2e-ebd1-4783-bb62-871e24f01543"
}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/385d80e1-193c-4b38-bf55-5185ffd6b473/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/385d80e1-193c-4b38-bf55-5185ffd6b473/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b12c5612-147d-4229-86ca-103174ba8fd1/reload' -d '{}'
POST /projects/{project_id}/vpcs/vms/{vm_id}/reload HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b12c5612-147d-4229-86ca-103174ba8fd1/reload HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/start' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01037fd2-9533-42db-bd19-df5b21e47fcf/start' -d '{}'
POST /projects/{project_id}/vpcs/vms/{vm_id}/start HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01037fd2-9533-42db-bd19-df5b21e47fcf/start HTTP/1.1
{}
@@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/20eefc85-f1b6-4e36-9601-cd0dc91faaa0/stop' -d '{}'
POST /projects/{project_id}/vpcs/vms/{vm_id}/stop HTTP/1.1
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/20eefc85-f1b6-4e36-9601-cd0dc91faaa0/stop HTTP/1.1
{}
+3 -3
View File
@@ -1,8 +1,8 @@
curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_update_path_project_non_l0"}'
curl -i -X PUT 'http://localhost:8000/projects/ef58b29e-59df-42c0-9492-5a766a13cb62' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_update_path_project_non_l0"}'
PUT /projects/{project_id} HTTP/1.1
PUT /projects/ef58b29e-59df-42c0-9492-5a766a13cb62 HTTP/1.1
{
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_update_path_project_non_l0"
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_update_path_project_non_l0"
}
@@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}' -d '{"console": 2001, "ethernet_adapters": 4, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0}'
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/324dab07-d86c-4a3b-8390-7a8e9a506006' -d '{"console": 2001, "ethernet_adapters": 4, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0}'
PUT /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/324dab07-d86c-4a3b-8390-7a8e9a506006 HTTP/1.1
{
"console": 2001,
"ethernet_adapters": 4,
@@ -28,9 +28,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
"l1_keepalives": true,
"name": "test",
"nvram": 2048,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_update0/iou.bin",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_update0/iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 512,
"serial_adapters": 0,
"vm_id": "e867af73-aaf1-4770-a935-78a357ea5db3"
"vm_id": "324dab07-d86c-4a3b-8390-7a8e9a506006"
}
@@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}' -d '{"console": 2002, "hdb_disk_image": "hdb", "name": "test", "ram": 1024}'
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a68a00de-a264-4cc0-821c-301af5059ea4' -d '{"console": 2002, "hdb_disk_image": "hdb", "name": "test", "ram": 1024}'
PUT /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a68a00de-a264-4cc0-821c-301af5059ea4 HTTP/1.1
{
"console": 2002,
"hdb_disk_image": "hdb",
@@ -33,7 +33,7 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"ram": 1024,
"vm_id": "8a0d735b-d485-4a2e-bae1-be54f426fbeb"
"vm_id": "a68a00de-a264-4cc0-821c-301af5059ea4"
}
@@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}' -d '{"console": 2010, "name": "test"}'
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4a6375b9-14b8-406c-ae8e-df6d242088f9' -d '{"console": 2010, "name": "test"}'
PUT /projects/{project_id}/virtualbox/vms/{vm_id} HTTP/1.1
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4a6375b9-14b8-406c-ae8e-df6d242088f9 HTTP/1.1
{
"console": 2010,
"name": "test"
@@ -24,6 +24,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
"name": "test",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"use_any_adapter": false,
"vm_id": "dcf2c555-703d-47cb-9dd2-8ee6c11b9f6c",
"vm_id": "4a6375b9-14b8-406c-ae8e-df6d242088f9",
"vmname": "VMTEST"
}
@@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}'
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/39951883-cbfb-4aff-9cbc-06895749e571' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}'
PUT /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/39951883-cbfb-4aff-9cbc-06895749e571 HTTP/1.1
{
"console": 2011,
"name": "test",
@@ -10,7 +10,7 @@ PUT /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 194
CONTENT-LENGTH: 236
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
@@ -21,5 +21,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
"name": "test",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": "ip 192.168.1.1",
"vm_id": "f27aa7da-e267-483a-adc6-2587e1377e8c"
"startup_script_path": "startup.vpc",
"vm_id": "39951883-cbfb-4aff-9cbc-06895749e571"
}
@@ -10,8 +10,8 @@ Add a NIO to a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************
@@ -129,8 +129,8 @@ Remove a NIO from a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************
@@ -10,8 +10,8 @@ Start a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************
@@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************
@@ -10,8 +10,8 @@ Add a NIO to a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter where the nio should be added
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter
Response status codes
@@ -28,8 +28,8 @@ Remove a NIO from a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter from where the nio should be removed
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter
Response status codes
@@ -10,8 +10,8 @@ Start a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter
Response status codes
@@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
Response status codes
-8
View File
@@ -1,8 +0,0 @@
Iou
---------------------
.. toctree::
:glob:
:maxdepth: 2
iou/*
@@ -1,62 +0,0 @@
/v1/projects/{project_id}/iou/vms
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a new IOU instance
Parameters
**********
- **project_id**: UUID for the project
Response status codes
**********************
- **400**: Invalid request
- **201**: Instance created
- **409**: Conflict
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>console</td> <td> </td> <td>['integer', 'null']</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config_content</td> <td> </td> <td>['string', 'null']</td> <td>Initial configuration of the IOU</td> </tr>
<tr><td>l1_keepalives</td> <td> </td> <td>['boolean', 'null']</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>ram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td> </td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>vm_id</td> <td> </td> <td></td> <td>IOU VM identifier</td> </tr>
</table>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>console</td> <td>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvms.txt
@@ -1,126 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **200**: Success
- **400**: Invalid request
- **404**: Instance doesn't exist
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>console</td> <td>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmid.txt
PUT /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **200**: Instance updated
- **400**: Invalid request
- **404**: Instance doesn't exist
- **409**: Conflict
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>console</td> <td> </td> <td>['integer', 'null']</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td> </td> <td>['integer', 'null']</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config_content</td> <td> </td> <td>['string', 'null']</td> <td>Initial configuration of the IOU</td> </tr>
<tr><td>l1_keepalives</td> <td> </td> <td>['boolean', 'null']</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Path of iou binary</td> </tr>
<tr><td>ram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td> </td> <td>['integer', 'null']</td> <td>How many serial adapters are connected to the IOU</td> </tr>
</table>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>console</td> <td>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/put_projectsprojectidiouvmsvmid.txt
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Delete a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance deleted
Sample session
***************
.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmid.txt
@@ -1,52 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add a NIO to a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **port_number**: Port where the nio should be added
Response status codes
**********************
- **400**: Invalid request
- **201**: NIO created
- **404**: Instance doesn't exist
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove a NIO from a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **port_number**: Port from where the nio should be removed
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: NIO deleted
Sample session
***************
.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -1,38 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
- **vm_id**: UUID for the instance
- **port_number**: Port on the adapter
Response status codes
**********************
- **200**: Capture started
- **400**: Invalid request
- **404**: Instance doesn't exist
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>capture_file_name</td> <td>&#10004;</td> <td>string</td> <td>Capture file name</td> </tr>
<tr><td>data_link_type</td> <td>&#10004;</td> <td>string</td> <td>PCAP data link type</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt
@@ -1,28 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
- **vm_id**: UUID for the instance
- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Capture stopped
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt
@@ -1,30 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/initial_config
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/initial_config
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the initial config content
Response status codes
**********************
- **200**: Initial config retrieved
- **400**: Invalid request
- **404**: Instance doesn't exist
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>content</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Content of the initial configuration file</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmidinitialconfig.txt
@@ -1,26 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/reload
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/reload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reload a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance reloaded
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidreload.txt
@@ -1,26 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/start
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/start
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance started
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstart.txt
@@ -1,26 +0,0 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/stop
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/stop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance stopped
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstop.txt
+2 -1
View File
@@ -9,7 +9,8 @@ Create a new project on the server
Response status codes
**********************
- **200**: OK
- **201**: Project created
- **409**: Project already created
Input
*******
@@ -10,8 +10,8 @@ Add a NIO to a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
Response status codes
@@ -34,8 +34,8 @@ Remove a NIO from a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
Response status codes
@@ -10,8 +10,8 @@ Add a NIO to a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter where the nio should be added
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter (always 0)
Response status codes
@@ -34,8 +34,8 @@ Remove a NIO from a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter from where the nio should be removed
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter (always)
Response status codes
@@ -10,8 +10,8 @@ Start a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter (always 0)
Response status codes
@@ -10,8 +10,8 @@ Stop a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
Response status codes
@@ -39,6 +39,7 @@ Output
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>startup_script</td> <td> </td> <td>['string', 'null']</td> <td>Content of the VPCS startup script</td> </tr>
<tr><td>startup_script_path</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the VPCS startup script relative to project directory</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM UUID</td> </tr>
</table>
@@ -28,6 +28,7 @@ Output
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>startup_script</td> <td> </td> <td>['string', 'null']</td> <td>Content of the VPCS startup script</td> </tr>
<tr><td>startup_script_path</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the VPCS startup script relative to project directory</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM UUID</td> </tr>
</table>
@@ -75,6 +76,7 @@ Output
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>startup_script</td> <td> </td> <td>['string', 'null']</td> <td>Content of the VPCS startup script</td> </tr>
<tr><td>startup_script_path</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the VPCS startup script relative to project directory</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VPCS VM UUID</td> </tr>
</table>
@@ -10,8 +10,8 @@ Add a NIO to a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
Response status codes
@@ -34,8 +34,8 @@ Remove a NIO from a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
Response status codes
+156
View File
@@ -16,6 +16,162 @@ JSON like that
"message": "Conflict"
}
Sample session using curl
=========================
.. warning::
Beware the output of this sample is truncated in order
to simplify the understanding. Please read the
documentation for the exact output.
You can check the server version with a simple curl command:
.. code-block:: shell-session
# curl "http://localhost:8000/v1/version"
{
"version": "1.3.dev1"
}
The next step is to create a project.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/projects" -d "{}"
{
"project_id": "42f9feee-3217-4104-981e-85d5f0a806ec",
"temporary": false
}
With this project id we can now create two VPCS VM.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 1"}'
{
"console": 2000,
"name": "VPCS 1",
"project_id": "42f9feee-3217-4104-981e-85d5f0a806ec",
"vm_id": "24d2e16b-fbef-4259-ae34-7bc21a41ee28"
}%
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 2"}'
{
"console": 2001,
"name": "VPCS 2",
"vm_id": "daefc24a-103c-4717-8e01-6517d931c1ae"
}
Now we need to link the two VPCS. The first step is to allocate on the remote servers
two UDP ports.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/ports/udp" -d '{}'
{
"udp_port": 10000
}
# curl -X POST "http://localhost:8000/v1/ports/udp" -d '{}'
{
"udp_port": 10001
}
We can create the bidirectionnal communication between the two VPCS. The
communication is made by creating two UDP tunnels.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/adapters/0/ports/0/nio" -d '{"lport": 10000, "rhost": "127.0.0.1", "rport": 10001, "type": "nio_udp"}'
{
"lport": 10000,
"rhost": "127.0.0.1",
"rport": 10001,
"type": "nio_udp"
}
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/adapters/0/ports/0/nio" -d '{"lport": 10001, "rhost": "127.0.0.1", "rport": 10000, "type": "nio_udp"}'
{
"lport": 10001,
"rhost": "127.0.0.1",
"rport": 10000,
"type": "nio_udp"
}
Now we can start the two VM
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/start" -d "{}"
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/start" -d '{}'
Everything should be started now. You can connect via telnet to the different VM.
The port is the field console in the create VM request.
.. code-block:: shell-session
# telnet 127.0.0.1 2000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to Virtual PC Simulator, version 0.6
Dedicated to Daling.
Build time: Dec 29 2014 12:51:46
Copyright (c) 2007-2014, Paul Meng (mirnshi@gmail.com)
All rights reserved.
VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.
Press '?' to get help.
VPCS> ip 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.1 255.255.255.0
VPCS> disconnect
Good-bye
Connection closed by foreign host.
# telnet 127.0.0.1 2001
telnet 127.0.0.1 2001
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to Virtual PC Simulator, version 0.6
Dedicated to Daling.
Build time: Dec 29 2014 12:51:46
Copyright (c) 2007-2014, Paul Meng (mirnshi@gmail.com)
All rights reserved.
VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.
Press '?' to get help.
VPCS> ip 192.168.1.2
Checking for duplicate address...
PC1 : 192.168.1.2 255.255.255.0
VPCS> ping 192.168.1.1
84 bytes from 192.168.1.1 icmp_seq=1 ttl=64 time=0.179 ms
84 bytes from 192.168.1.1 icmp_seq=2 ttl=64 time=0.218 ms
84 bytes from 192.168.1.1 icmp_seq=3 ttl=64 time=0.190 ms
84 bytes from 192.168.1.1 icmp_seq=4 ttl=64 time=0.198 ms
84 bytes from 192.168.1.1 icmp_seq=5 ttl=64 time=0.185 ms
VPCS> disconnect
Good-bye
Connection closed by foreign host.
Limitations
============
+3 -1
View File
@@ -15,6 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
from gns3server.handlers.api.version_handler import VersionHandler
from gns3server.handlers.api.network_handler import NetworkHandler
from gns3server.handlers.api.project_handler import ProjectHandler
@@ -25,5 +27,5 @@ from gns3server.handlers.api.virtualbox_handler import VirtualBoxHandler
from gns3server.handlers.api.vpcs_handler import VPCSHandler
from gns3server.handlers.upload_handler import UploadHandler
if sys.platform.startswith("linux"):
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"):
from gns3server.handlers.api.iou_handler import IOUHandler
+1 -1
View File
@@ -23,7 +23,7 @@ from .qemu import Qemu
MODULES = [VPCS, VirtualBox, Dynamips, Qemu]
if sys.platform.startswith("linux"):
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"):
# IOU runs only on Linux
from .iou import IOU
MODULES.append(IOU)
+6 -4
View File
@@ -15,14 +15,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import socket
import asyncio
import tempfile
import shutil
import os
import sys
from aiohttp import web
sys._called_from_test = True
# Prevent execution of external binaries
os.environ["PATH"] = tempfile.mkdtemp()
from gns3server.config import Config
from gns3server.web.route import Route
# TODO: get rid of *
@@ -33,10 +39,6 @@ from gns3server.modules.project_manager import ProjectManager
from tests.handlers.api.base import Query
# Prevent execution of external binaries
os.environ["PATH"] = tempfile.mkdtemp()
@pytest.yield_fixture
def restore_original_path():
"""
+3 -3
View File
@@ -93,14 +93,14 @@ class Query:
response.json = {}
response.html = ""
if kwargs.get('example') and os.environ.get("PYTEST_BUILD_DOCUMENTATION") == "1":
self._dump_example(method, response.route, body, response)
self._dump_example(method, response.route, path, body, response)
return response
def _dump_example(self, method, path, body, response):
def _dump_example(self, method, route, path, body, response):
"""Dump the request for the documentation"""
if path is None:
return
with open(self._example_file_path(method, path), 'w+') as f:
with open(self._example_file_path(method, route), 'w+') as f:
f.write("curl -i -X {} 'http://localhost:8000{}'".format(method, path))
if body:
f.write(" -d '{}'".format(re.sub(r"\n", "", json.dumps(json.loads(body), sort_keys=True))))