diff --git a/CHANGELOG b/CHANGELOG index 34b408f7..f4489a60 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,23 @@ # Change Log +## 1.4.0rc3 05/01/2016 + +* API documentation update +* Fix race condition when killing iouyap +* Catch exception if we can't change process priority on Windows +* Adds a handler for getting the Qemu related capabilities of the server. Currently includes just a check for KVM architectures. +* Fixed showing of Qemu hdb_disk_interface - it showed hda_disk_interface instead, which resulted in an odd visual glitch in the GUI. +* Made the gns3server.bat successfully start the server independent of the CWD at the time of running. It's now relative to the location of the .bat file itself. +* Add more informations in the debug status page +* Fix status link in GNS3 homepage +* Fix tests on Windows +* Fix missing boot priority order +* A debug status page embed in the server +* Fix test on Windows +* Update links for new website. +* Contributing instructions + + ## 1.3.13 11/12/2015 * Update links for new website. diff --git a/docs/api/examples/delete_projectsprojectid.txt b/docs/api/examples/delete_projectsprojectid.txt index 3b468701..36665b8c 100644 --- a/docs/api/examples/delete_projectsprojectid.txt +++ b/docs/api/examples/delete_projectsprojectid.txt @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id} diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt index 751d40da..8270b459 100644 --- a/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/468f944e-e195-4a5d-b192-8c954f46d028' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0813062d-a796-44ef-a5ed-e690c633012e' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/468f944e-e195-4a5d-b192-8c954f46d028 HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0813062d-a796-44ef-a5ed-e690c633012e HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt index d0e16c24..9432d0ee 100644 --- a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/85c30dd1-bb4f-4826-aa67-74574ffc400a/adapters/1/ports/0/nio' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/8759140f-eb6f-4f3b-9a7f-86c79ec747b9/adapters/1/ports/0/nio' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/85c30dd1-bb4f-4826-aa67-74574ffc400a/adapters/1/ports/0/nio HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/8759140f-eb6f-4f3b-9a7f-86c79ec747b9/adapters/1/ports/0/nio HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt index cabb07ad..a884ebc5 100644 --- a/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d18deaf3-f59a-423d-8de6-0fab7b3ac21e' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1b1a72b7-97ea-4598-8c02-2edc285f7987' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d18deaf3-f59a-423d-8de6-0fab7b3ac21e HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1b1a72b7-97ea-4598-8c02-2edc285f7987 HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} diff --git a/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 8d109e99..f1b7a599 100644 --- a/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/56a77fc8-cdb4-417b-aacd-dc8cbd47736a/adapters/1/ports/0/nio' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b5c23125-ea22-4008-a89e-72565ae9f746/adapters/1/ports/0/nio' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/56a77fc8-cdb4-417b-aacd-dc8cbd47736a/adapters/1/ports/0/nio HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b5c23125-ea22-4008-a89e-72565ae9f746/adapters/1/ports/0/nio HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 04c5e824..0097d4f8 100644 --- a/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1e9000cf-f12d-48d7-8d17-814c048fd2dd/adapters/0/ports/0/nio' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/3f79083e-3da8-433e-9e9b-fe72a602ab4e/adapters/0/ports/0/nio' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1e9000cf-f12d-48d7-8d17-814c048fd2dd/adapters/0/ports/0/nio HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/3f79083e-3da8-433e-9e9b-fe72a602ab4e/adapters/0/ports/0/nio HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt index 01c91f9e..a65bc4f9 100644 --- a/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c8f5fb77-a38c-44dc-8cc3-effc463c96b4' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f9f4ab8-1b77-4eee-b0fb-e8d299b843a7' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c8f5fb77-a38c-44dc-8cc3-effc463c96b4 HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f9f4ab8-1b77-4eee-b0fb-e8d299b843a7 HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt index c5dad901..b82b051e 100644 --- a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01e74a7c-c765-4273-bef3-fdfe7cc1ddfa/adapters/0/ports/0/nio' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6666f3a7-d805-4572-a35c-bc15213f0b52/adapters/0/ports/0/nio' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01e74a7c-c765-4273-bef3-fdfe7cc1ddfa/adapters/0/ports/0/nio HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6666f3a7-d805-4572-a35c-bc15213f0b52/adapters/0/ports/0/nio HTTP/1.1 @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt index 5109d1f8..546cee82 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/get_interfaces.txt @@ -7,27 +7,17 @@ GET /v1/interfaces HTTP/1.1 HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 6181 +CONTENT-LENGTH: 1012 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/interfaces [ { - "id": "lo0", - "ip_address": "127.0.0.1", - "name": "lo0" - }, - { - "id": "gif0", + "id": "bridge0", "ip_address": "", - "name": "gif0" - }, - { - "id": "stf0", - "ip_address": "", - "name": "stf0" + "name": "bridge0" }, { "id": "en0", @@ -39,34 +29,34 @@ X-ROUTE: /v1/interfaces "ip_address": "192.168.84.114", "name": "en1" }, + { + "id": "en2", + "ip_address": "", + "name": "en2" + }, { "id": "fw0", "ip_address": "", "name": "fw0" }, { - "id": "en2", - "ip_address": "", - "name": "en2" + "id": "lo0", + "ip_address": "127.0.0.1", + "name": "lo0" }, { "id": "p2p0", "ip_address": "", "name": "p2p0" }, - { - "id": "bridge0", - "ip_address": "", - "name": "bridge0" - }, { "id": "vboxnet0", - "ip_address": "", + "ip_address": "172.16.43.1", "name": "vboxnet0" }, { "id": "vboxnet1", - "ip_address": "", + "ip_address": "192.168.59.3", "name": "vboxnet1" }, { @@ -78,255 +68,5 @@ X-ROUTE: /v1/interfaces "id": "vboxnet3", "ip_address": "192.168.99.1", "name": "vboxnet3" - }, - { - "id": "vmnet1", - "ip_address": "172.16.16.1", - "name": "vmnet1" - }, - { - "id": "vmnet2", - "ip_address": "172.16.0.1", - "name": "vmnet2" - }, - { - "id": "vmnet3", - "ip_address": "172.16.1.1", - "name": "vmnet3" - }, - { - "id": "vmnet4", - "ip_address": "172.16.2.1", - "name": "vmnet4" - }, - { - "id": "vmnet5", - "ip_address": "172.16.3.1", - "name": "vmnet5" - }, - { - "id": "vmnet6", - "ip_address": "172.16.4.1", - "name": "vmnet6" - }, - { - "id": "vmnet7", - "ip_address": "172.16.5.1", - "name": "vmnet7" - }, - { - "id": "vmnet8", - "ip_address": "192.168.229.1", - "name": "vmnet8" - }, - { - "id": "vmnet9", - "ip_address": "172.16.6.1", - "name": "vmnet9" - }, - { - "id": "vmnet10", - "ip_address": "172.16.7.1", - "name": "vmnet10" - }, - { - "id": "vmnet11", - "ip_address": "172.16.8.1", - "name": "vmnet11" - }, - { - "id": "vmnet12", - "ip_address": "172.16.9.1", - "name": "vmnet12" - }, - { - "id": "vmnet13", - "ip_address": "172.16.10.1", - "name": "vmnet13" - }, - { - "id": "vmnet14", - "ip_address": "172.16.11.1", - "name": "vmnet14" - }, - { - "id": "vmnet15", - "ip_address": "172.16.12.1", - "name": "vmnet15" - }, - { - "id": "vmnet16", - "ip_address": "172.16.13.1", - "name": "vmnet16" - }, - { - "id": "vmnet17", - "ip_address": "172.16.14.1", - "name": "vmnet17" - }, - { - "id": "vmnet18", - "ip_address": "172.16.15.1", - "name": "vmnet18" - }, - { - "id": "vmnet19", - "ip_address": "172.16.17.1", - "name": "vmnet19" - }, - { - "id": "vmnet20", - "ip_address": "172.16.18.1", - "name": "vmnet20" - }, - { - "id": "vmnet21", - "ip_address": "172.16.19.1", - "name": "vmnet21" - }, - { - "id": "vmnet22", - "ip_address": "172.16.20.1", - "name": "vmnet22" - }, - { - "id": "vmnet23", - "ip_address": "172.16.21.1", - "name": "vmnet23" - }, - { - "id": "vmnet24", - "ip_address": "172.16.22.1", - "name": "vmnet24" - }, - { - "id": "vmnet25", - "ip_address": "172.16.23.1", - "name": "vmnet25" - }, - { - "id": "vmnet26", - "ip_address": "172.16.24.1", - "name": "vmnet26" - }, - { - "id": "vmnet27", - "ip_address": "172.16.25.1", - "name": "vmnet27" - }, - { - "id": "vmnet28", - "ip_address": "172.16.26.1", - "name": "vmnet28" - }, - { - "id": "vmnet29", - "ip_address": "172.16.27.1", - "name": "vmnet29" - }, - { - "id": "vmnet30", - "ip_address": "172.16.28.1", - "name": "vmnet30" - }, - { - "id": "vmnet31", - "ip_address": "172.16.29.1", - "name": "vmnet31" - }, - { - "id": "vmnet32", - "ip_address": "172.16.30.1", - "name": "vmnet32" - }, - { - "id": "vmnet33", - "ip_address": "172.16.31.1", - "name": "vmnet33" - }, - { - "id": "vmnet34", - "ip_address": "172.16.32.1", - "name": "vmnet34" - }, - { - "id": "vmnet35", - "ip_address": "172.16.33.1", - "name": "vmnet35" - }, - { - "id": "vmnet36", - "ip_address": "172.16.34.1", - "name": "vmnet36" - }, - { - "id": "vmnet37", - "ip_address": "172.16.35.1", - "name": "vmnet37" - }, - { - "id": "vmnet38", - "ip_address": "172.16.36.1", - "name": "vmnet38" - }, - { - "id": "vmnet39", - "ip_address": "172.16.37.1", - "name": "vmnet39" - }, - { - "id": "vmnet40", - "ip_address": "172.16.38.1", - "name": "vmnet40" - }, - { - "id": "vmnet41", - "ip_address": "172.16.39.1", - "name": "vmnet41" - }, - { - "id": "vmnet42", - "ip_address": "172.16.40.1", - "name": "vmnet42" - }, - { - "id": "vmnet43", - "ip_address": "172.16.41.1", - "name": "vmnet43" - }, - { - "id": "vmnet44", - "ip_address": "172.16.42.1", - "name": "vmnet44" - }, - { - "id": "vmnet45", - "ip_address": "172.16.43.1", - "name": "vmnet45" - }, - { - "id": "vmnet46", - "ip_address": "172.16.44.1", - "name": "vmnet46" - }, - { - "id": "vmnet47", - "ip_address": "172.16.45.1", - "name": "vmnet47" - }, - { - "id": "vmnet48", - "ip_address": "172.16.46.1", - "name": "vmnet48" - }, - { - "id": "vmnet49", - "ip_address": "172.16.47.1", - "name": "vmnet49" - }, - { - "id": "vmnet50", - "ip_address": "172.16.48.1", - "name": "vmnet50" } ] diff --git a/docs/api/examples/get_iouvms.txt b/docs/api/examples/get_iouvms.txt index a34e9cfc..e9f45840 100644 --- a/docs/api/examples/get_iouvms.txt +++ b/docs/api/examples/get_iouvms.txt @@ -10,7 +10,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 72 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/iou/vms [ diff --git a/docs/api/examples/get_projects.txt b/docs/api/examples/get_projects.txt index 857fed6c..c838d962 100644 --- a/docs/api/examples/get_projects.txt +++ b/docs/api/examples/get_projects.txt @@ -10,22 +10,22 @@ CONNECTION: keep-alive CONTENT-LENGTH: 656 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects [ { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmppth7jfny", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpmwnekqxo", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmppth7jfny/00010203-0405-0607-0809-0a0b0c0d0e0f", - "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpmwnekqxo/00010203-0405-0607-0809-0a0b0c0d0e0b", + "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0b", "temporary": false }, { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmppth7jfny", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpmwnekqxo", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmppth7jfny/00010203-0405-0607-0809-0a0b0c0d0e0b", - "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0b", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpmwnekqxo/00010203-0405-0607-0809-0a0b0c0d0e0f", + "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "temporary": false } ] diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/get_projectsprojectid.txt index bfa6e8b1..abf0fc41 100644 --- a/docs/api/examples/get_projectsprojectid.txt +++ b/docs/api/examples/get_projectsprojectid.txt @@ -10,13 +10,13 @@ CONNECTION: keep-alive CONTENT-LENGTH: 297 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id} { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpytbnsctl", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpchvw88rg", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpytbnsctl/00010203-0405-0607-0809-0a0b0c0d0e02", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpchvw88rg/00010203-0405-0607-0809-0a0b0c0d0e02", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e02", "temporary": false } diff --git a/docs/api/examples/get_projectsprojectidfiles.txt b/docs/api/examples/get_projectsprojectidfiles.txt index d5ce89fc..fe554479 100644 --- a/docs/api/examples/get_projectsprojectidfiles.txt +++ b/docs/api/examples/get_projectsprojectidfiles.txt @@ -10,7 +10,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 204 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/files [ diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt index 59469c12..ad02cc8e 100644 --- a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt @@ -1,33 +1,33 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/1c801186-7a6d-4e92-9a10-9d61e8bdc25a' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/82f6e25c-6960-421d-9567-a7453642935b' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/1c801186-7a6d-4e92-9a10-9d61e8bdc25a HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/82f6e25c-6960-421d-9567-a7453642935b HTTP/1.1 HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 721 +CONTENT-LENGTH: 610 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} { - "console": 2000, + "console": 2001, "ethernet_adapters": 2, "iourc_path": null, "l1_keepalives": false, - "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c", + "md5sum": null, "name": "PC TEST 1", "nvram": 128, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_iou_get0/iou.bin", + "path": "iou.bin", "private_config": null, "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "ram": 256, "serial_adapters": 2, "startup_config": null, "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph6drru9t/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/1c801186-7a6d-4e92-9a10-9d61e8bdc25a", - "vm_id": "1c801186-7a6d-4e92-9a10-9d61e8bdc25a" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2yt9sd1l/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/82f6e25c-6960-421d-9567-a7453642935b", + "vm_id": "82f6e25c-6960-421d-9567-a7453642935b" } diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt b/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt index 331061fc..fb976908 100644 --- a/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt +++ b/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/46c8a3b3-12a2-42ff-9542-0d9e43dea734/configs' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/9ff2d283-1365-4422-93e7-e14c56b809cb/configs' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/46c8a3b3-12a2-42ff-9542-0d9e43dea734/configs HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/9ff2d283-1365-4422-93e7-e14c56b809cb/configs HTTP/1.1 @@ -10,7 +10,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 40 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/configs { diff --git a/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt index 8834ad93..afcaa30b 100644 --- a/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt @@ -1,16 +1,16 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a5c7b71e-03a5-4fe8-a7c5-ec5bd6e60a62' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/84777300-eef4-4a3a-9135-d7009bdb0722' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a5c7b71e-03a5-4fe8-a7c5-ec5bd6e60a62 HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/84777300-eef4-4a3a-9135-d7009bdb0722 HTTP/1.1 HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 1336 +CONTENT-LENGTH: 1353 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} { @@ -20,7 +20,7 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "boot_priority": "c", "cdrom_image": "", "cdrom_image_md5sum": null, - "console": 2000, + "console": 2001, "console_type": "telnet", "cpu_throttling": 0, "cpus": 1, @@ -42,14 +42,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:0a:62:00", + "mac_address": "00:00:ab:07:22:00", "name": "PC TEST 1", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3zzynydr/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph3pfurip/qemu-system-x86_64", "ram": 256, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/a5c7b71e-03a5-4fe8-a7c5-ec5bd6e60a62", - "vm_id": "a5c7b71e-03a5-4fe8-a7c5-ec5bd6e60a62" + "usage": "", + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/84777300-eef4-4a3a-9135-d7009bdb0722", + "vm_id": "84777300-eef4-4a3a-9135-d7009bdb0722" } diff --git a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt index 3980dd80..b2bee70c 100644 --- a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/2210fd53-0ea3-4c66-8de0-9cceedb471fe' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/63b9b470-5a07-4cfe-b9d5-ae5d5518b988' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/2210fd53-0ea3-4c66-8de0-9cceedb471fe HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/63b9b470-5a07-4cfe-b9d5-ae5d5518b988 HTTP/1.1 @@ -10,14 +10,14 @@ CONNECTION: keep-alive CONTENT-LENGTH: 415 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} { "acpi_shutdown": false, "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)", "adapters": 0, - "console": 2001, + "console": 2002, "enable_remote_console": false, "headless": false, "name": "VMTEST", @@ -25,6 +25,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "2210fd53-0ea3-4c66-8de0-9cceedb471fe", + "vm_id": "63b9b470-5a07-4cfe-b9d5-ae5d5518b988", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt index 3c93307b..9854b65a 100644 --- a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/521f3776-d6d0-42a3-ac6d-7dc0c19d7fad' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/7e24fcc2-e38c-43e8-a7bb-fc22d7b91547' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/521f3776-d6d0-42a3-ac6d-7dc0c19d7fad HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/7e24fcc2-e38c-43e8-a7bb-fc22d7b91547 HTTP/1.1 @@ -10,16 +10,16 @@ CONNECTION: keep-alive CONTENT-LENGTH: 422 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} { - "console": 2009, + "console": 2010, "name": "PC TEST 1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "startup_script": null, "startup_script_path": null, "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/521f3776-d6d0-42a3-ac6d-7dc0c19d7fad", - "vm_id": "521f3776-d6d0-42a3-ac6d-7dc0c19d7fad" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/7e24fcc2-e38c-43e8-a7bb-fc22d7b91547", + "vm_id": "7e24fcc2-e38c-43e8-a7bb-fc22d7b91547" } diff --git a/docs/api/examples/get_qemubinaries.txt b/docs/api/examples/get_qemubinaries.txt index 410245d7..bba76e15 100644 --- a/docs/api/examples/get_qemubinaries.txt +++ b/docs/api/examples/get_qemubinaries.txt @@ -1,25 +1,33 @@ -curl -i -X GET 'http://localhost:8000/v1/qemu/binaries' +curl -i -X GET 'http://localhost:8000/v1/qemu/binaries' -d '{"archs": ["i386"]}' GET /v1/qemu/binaries HTTP/1.1 - +{ + "archs": [ + "i386" + ] +} HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 134 +CONTENT-LENGTH: 212 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/qemu/binaries [ { - "path": "/tmp/1", + "path": "/tmp/x86_64", "version": "2.2.0" }, { - "path": "/tmp/2", + "path": "/tmp/alpha", + "version": "2.1.0" + }, + { + "path": "/tmp/i386", "version": "2.1.0" } ] diff --git a/docs/api/examples/get_qemucapabilities.txt b/docs/api/examples/get_qemucapabilities.txt new file mode 100644 index 00000000..1f348cfa --- /dev/null +++ b/docs/api/examples/get_qemucapabilities.txt @@ -0,0 +1,20 @@ +curl -i -X GET 'http://localhost:8000/v1/qemu/capabilities' + +GET /v1/qemu/capabilities HTTP/1.1 + + + +HTTP/1.1 200 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONNECTION: keep-alive +CONTENT-LENGTH: 39 +CONTENT-TYPE: application/json +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.4.0dev13 +X-ROUTE: /v1/qemu/capabilities + +{ + "kvm": [ + "x86_64" + ] +} diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt index 466035b6..76196256 100644 --- a/docs/api/examples/get_version.txt +++ b/docs/api/examples/get_version.txt @@ -10,10 +10,10 @@ CONNECTION: keep-alive CONTENT-LENGTH: 50 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/version { "local": true, - "version": "1.4.0.dev9" + "version": "1.4.0dev13" } diff --git a/docs/api/examples/post_configreload.txt b/docs/api/examples/post_configreload.txt index 765dfb2a..6d0ec2c0 100644 --- a/docs/api/examples/post_configreload.txt +++ b/docs/api/examples/post_configreload.txt @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/config/reload diff --git a/docs/api/examples/post_projects.txt b/docs/api/examples/post_projects.txt index bb87e491..e63a90ac 100644 --- a/docs/api/examples/post_projects.txt +++ b/docs/api/examples/post_projects.txt @@ -12,13 +12,13 @@ CONNECTION: keep-alive CONTENT-LENGTH: 297 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpz4njup0u", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpp319gdgn", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpz4njup0u/2547d75b-6059-4cff-a2ff-ac78ad5b98c7", - "project_id": "2547d75b-6059-4cff-a2ff-ac78ad5b98c7", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpp319gdgn/054e6ecb-1e9d-4c74-ad08-1209264bd96d", + "project_id": "054e6ecb-1e9d-4c74-ad08-1209264bd96d", "temporary": false } diff --git a/docs/api/examples/post_projectsprojectidclose.txt b/docs/api/examples/post_projectsprojectidclose.txt index 97018360..e3538f17 100644 --- a/docs/api/examples/post_projectsprojectidclose.txt +++ b/docs/api/examples/post_projectsprojectidclose.txt @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/close diff --git a/docs/api/examples/post_projectsprojectidcommit.txt b/docs/api/examples/post_projectsprojectidcommit.txt index 11396e95..18172833 100644 --- a/docs/api/examples/post_projectsprojectidcommit.txt +++ b/docs/api/examples/post_projectsprojectidcommit.txt @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/commit diff --git a/docs/api/examples/post_projectsprojectidiouvms.txt b/docs/api/examples/post_projectsprojectidiouvms.txt index 8a46b970..bf0fe67c 100644 --- a/docs/api/examples/post_projectsprojectidiouvms.txt +++ b/docs/api/examples/post_projectsprojectidiouvms.txt @@ -1,38 +1,38 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"name": "PC TEST 1", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_iou_create_startup_config0/iou.bin", "startup_config_content": "hostname test", "vm_id": "57ca3a20-ffd9-4b99-b35c-038552374f05"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"name": "PC TEST 1", "path": "iou.bin", "startup_config_content": "hostname test", "vm_id": "afa904bc-8968-4e7c-87b6-11d92174f1e6"}' POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms HTTP/1.1 { "name": "PC TEST 1", - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_iou_create_startup_config0/iou.bin", + "path": "iou.bin", "startup_config_content": "hostname test", - "vm_id": "57ca3a20-ffd9-4b99-b35c-038552374f05" + "vm_id": "afa904bc-8968-4e7c-87b6-11d92174f1e6" } HTTP/1.1 201 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 755 +CONTENT-LENGTH: 626 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms { - "console": 2000, + "console": 2001, "ethernet_adapters": 2, "iourc_path": null, "l1_keepalives": false, - "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c", + "md5sum": null, "name": "PC TEST 1", "nvram": 128, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_iou_create_startup_config0/iou.bin", + "path": "iou.bin", "private_config": null, "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "ram": 256, "serial_adapters": 2, "startup_config": "startup-config.cfg", "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph6drru9t/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/57ca3a20-ffd9-4b99-b35c-038552374f05", - "vm_id": "57ca3a20-ffd9-4b99-b35c-038552374f05" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2yt9sd1l/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/afa904bc-8968-4e7c-87b6-11d92174f1e6", + "vm_id": "afa904bc-8968-4e7c-87b6-11d92174f1e6" } diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 624bcdee..2ccdc22e 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,8 +1,8 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/3ae4cab0-1bd0-4382-9192-5b78868d1626/adapters/1/ports/0/nio' -d '{"ethernet_device": "lo0", "type": "nio_generic_ethernet"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/eea449ce-e25b-4beb-b50f-fcd77241a97b/adapters/1/ports/0/nio' -d '{"ethernet_device": "bridge0", "type": "nio_generic_ethernet"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/3ae4cab0-1bd0-4382-9192-5b78868d1626/adapters/1/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/eea449ce-e25b-4beb-b50f-fcd77241a97b/adapters/1/ports/0/nio HTTP/1.1 { - "ethernet_device": "lo0", + "ethernet_device": "bridge0", "type": "nio_generic_ethernet" } @@ -10,13 +10,13 @@ POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/3ae4cab0-1bd0-438 HTTP/1.1 201 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 68 +CONTENT-LENGTH: 72 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { - "ethernet_device": "lo0", + "ethernet_device": "bridge0", "type": "nio_generic_ethernet" } diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt index 15d01f47..1a506166 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/98a1fa54-ff5e-4119-85a5-20a7b5fdac31/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/14a4f240-54e7-47f7-b9e7-3640528415fe/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/98a1fa54-ff5e-4119-85a5-20a7b5fdac31/adapters/0/ports/0/start_capture HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/14a4f240-54e7-47f7-b9e7-3640528415fe/adapters/0/ports/0/start_capture HTTP/1.1 { "capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB" @@ -13,9 +13,9 @@ CONNECTION: keep-alive CONTENT-LENGTH: 158 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 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/tmph6drru9t/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" + "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2yt9sd1l/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" } diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt index cffef79a..db79902e 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/68c9da1c-6960-4c6e-aea1-e4f76e313341/adapters/0/ports/0/stop_capture' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/992e1579-2232-4aac-93ef-970c3bb67966/adapters/0/ports/0/stop_capture' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/68c9da1c-6960-4c6e-aea1-e4f76e313341/adapters/0/ports/0/stop_capture HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/992e1579-2232-4aac-93ef-970c3bb67966/adapters/0/ports/0/stop_capture HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt index e63fa6e0..7c2eb3b4 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7aecd0ae-3b0d-4b00-b8b6-0de9caffd102/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f23517b-b45e-4e7b-b908-c501c36abe16/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7aecd0ae-3b0d-4b00-b8b6-0de9caffd102/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f23517b-b45e-4e7b-b908-c501c36abe16/reload HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt index 7784fea1..6e308f54 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f932ec58-f509-44e6-8b30-aa0de3cc98e8/start' -d '{"iourc_content": "test"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2923f599-894a-4b18-a9eb-17a389298f84/start' -d '{"iourc_content": "test"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f932ec58-f509-44e6-8b30-aa0de3cc98e8/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2923f599-894a-4b18-a9eb-17a389298f84/start HTTP/1.1 { "iourc_content": "test" } @@ -11,6 +11,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/start diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt index e07154ac..3feaf6b0 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt +++ b/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/abbc1d5d-0b77-41e2-8681-75ad954e32c6/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ff05b41f-cd2b-4b33-90be-9362430b68ae/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/abbc1d5d-0b77-41e2-8681-75ad954e32c6/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ff05b41f-cd2b-4b33-90be-9362430b68ae/stop HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/stop diff --git a/docs/api/examples/post_projectsprojectidportsudp.txt b/docs/api/examples/post_projectsprojectidportsudp.txt index dbdb5d11..b82c6f19 100644 --- a/docs/api/examples/post_projectsprojectidportsudp.txt +++ b/docs/api/examples/post_projectsprojectidportsudp.txt @@ -10,7 +10,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 25 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/ports/udp { diff --git a/docs/api/examples/post_projectsprojectidqemuvms.txt b/docs/api/examples/post_projectsprojectidqemuvms.txt index 4774a9f2..7949b11e 100644 --- a/docs/api/examples/post_projectsprojectidqemuvms.txt +++ b/docs/api/examples/post_projectsprojectidqemuvms.txt @@ -1,10 +1,10 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_create_with_params0/linux.img", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3zzynydr/qemu-system-x86_64", "ram": 1024}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "linux.img", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph3pfurip/qemu-system-x86_64", "ram": 1024}' POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1 { - "hda_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_create_with_params0/linux.img", + "hda_disk_image": "linux.img", "name": "PC TEST 1", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3zzynydr/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph3pfurip/qemu-system-x86_64", "ram": 1024 } @@ -12,10 +12,10 @@ POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1 HTTP/1.1 201 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 1473 +CONTENT-LENGTH: 1363 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms { @@ -25,12 +25,12 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms "boot_priority": "c", "cdrom_image": "", "cdrom_image_md5sum": null, - "console": 2000, + "console": 2001, "console_type": "telnet", "cpu_throttling": 0, "cpus": 1, - "hda_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_create_with_params0/linux.img", - "hda_disk_image_md5sum": "c4ca4238a0b923820dcc509a6f75849b", + "hda_disk_image": "linux.img", + "hda_disk_image_md5sum": null, "hda_disk_interface": "ide", "hdb_disk_image": "", "hdb_disk_image_md5sum": null, @@ -47,14 +47,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:71:f2:00", + "mac_address": "00:00:ab:50:58:00", "name": "PC TEST 1", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3zzynydr/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph3pfurip/qemu-system-x86_64", "ram": 1024, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/72f88dce-6c67-4e46-b42d-81a8c4f371f2", - "vm_id": "72f88dce-6c67-4e46-b42d-81a8c4f371f2" + "usage": "", + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/b949f2e2-d338-4b51-aea9-270196ed5058", + "vm_id": "b949f2e2-d338-4b51-aea9-270196ed5058" } diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt index dbfaa317..af51745e 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/270ea3e8-d916-440b-bc8c-5ce63bbc71b5/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/82435d91-3cb5-4a44-abff-34a4ae46b24f/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/270ea3e8-d916-440b-bc8c-5ce63bbc71b5/adapters/1/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/82435d91-3cb5-4a44-abff-34a4ae46b24f/adapters/1/ports/0/nio HTTP/1.1 { "ethernet_device": "eth0", "type": "nio_generic_ethernet" @@ -13,7 +13,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt index 4bc01a84..0140288a 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/7ba8c4e8-af84-4c2c-85f7-825e8321ba5d/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/3275bdce-9b75-445f-8168-0103cd524182/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/7ba8c4e8-af84-4c2c-85f7-825e8321ba5d/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/3275bdce-9b75-445f-8168-0103cd524182/reload HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt index 2ecaef2e..8306c0c2 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/68376eea-9e5a-4dd8-97c5-c3155b02cd8e/resume' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2d03502f-6b3f-4551-b924-b74fd5d6cdf5/resume' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/68376eea-9e5a-4dd8-97c5-c3155b02cd8e/resume HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2d03502f-6b3f-4551-b924-b74fd5d6cdf5/resume HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/resume diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt index 7694e319..b4699682 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1f8a3aaa-fb64-4c51-a9e2-019215012aab/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/04afa03a-3d9b-4aa7-945f-8f3077b6790e/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1f8a3aaa-fb64-4c51-a9e2-019215012aab/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/04afa03a-3d9b-4aa7-945f-8f3077b6790e/start HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/start diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt index b003cf01..1b0b590e 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/79c98a6f-9a1b-44c3-be28-ed2f924e3960/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/f5bfbadc-9a09-4090-a624-89be68858746/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/79c98a6f-9a1b-44c3-be28-ed2f924e3960/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/f5bfbadc-9a09-4090-a624-89be68858746/stop HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/stop diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt index 45480ac1..5fee4174 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt +++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/52cfc381-0cb0-4d90-868d-8554ef5a9a33/suspend' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/bb00b1e0-f19d-4ce8-b99a-82c1518fa33e/suspend' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/52cfc381-0cb0-4d90-868d-8554ef5a9a33/suspend HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/bb00b1e0-f19d-4ce8-b99a-82c1518fa33e/suspend HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/suspend diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt index 33bce505..18ea88be 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt @@ -14,14 +14,14 @@ CONNECTION: keep-alive CONTENT-LENGTH: 409 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms { "acpi_shutdown": false, "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)", "adapters": 0, - "console": 2000, + "console": 2001, "enable_remote_console": false, "headless": false, "name": "VM1", @@ -29,6 +29,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "7d54caf7-ab92-4a5f-8795-1ebdfcc6994b", + "vm_id": "39cc5964-d0be-487b-9f0c-8fbea600e452", "vmname": "VM1" } diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 9d6e8fbe..2b40e2b9 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5815ff12-a889-492e-97ca-be06a45f03ce/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/556aba72-c19a-4fc3-a350-9454791687f4/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5815ff12-a889-492e-97ca-be06a45f03ce/adapters/0/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/556aba72-c19a-4fc3-a350-9454791687f4/adapters/0/ports/0/nio HTTP/1.1 { "lport": 4242, "rhost": "127.0.0.1", @@ -15,7 +15,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt index c67e84fc..b4eb77d6 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c4c394ec-3785-4e37-908a-a88a01055a8a/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1a517572-9b86-441a-8347-1d28b01d9a41/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c4c394ec-3785-4e37-908a-a88a01055a8a/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1a517572-9b86-441a-8347-1d28b01d9a41/reload HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt index bd72ded4..7ff55602 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a30c8568-dd5f-417e-95c6-45568972d2c5/resume' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/7f5648e4-0ce8-49b3-b470-f2b821a5fe3e/resume' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a30c8568-dd5f-417e-95c6-45568972d2c5/resume HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/7f5648e4-0ce8-49b3-b470-f2b821a5fe3e/resume HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt index 5e8ccc56..a37f7d80 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6bedf287-1a80-452d-b000-078166f7b3e0/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/ee1fef8f-cbe1-4590-8c47-fbd12f7f6beb/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6bedf287-1a80-452d-b000-078166f7b3e0/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/ee1fef8f-cbe1-4590-8c47-fbd12f7f6beb/start HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/start diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt index c20b2535..d1b07cbf 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/8d39aad0-03e2-423b-8684-584892e116ab/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5e8543c3-45a7-4668-824f-01eaeb848898/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/8d39aad0-03e2-423b-8684-584892e116ab/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5e8543c3-45a7-4668-824f-01eaeb848898/stop HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt index f80beb8d..e7db500d 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a2fed430-ad13-45fc-935f-07618993f272/suspend' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/95f620da-c0e5-4404-81fc-10f3e18786cb/suspend' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a2fed430-ad13-45fc-935f-07618993f272/suspend HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/95f620da-c0e5-4404-81fc-10f3e18786cb/suspend HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend diff --git a/docs/api/examples/post_projectsprojectidvpcsvms.txt b/docs/api/examples/post_projectsprojectidvpcsvms.txt index 7f768a80..584c6d5b 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvms.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvms.txt @@ -12,16 +12,16 @@ CONNECTION: keep-alive CONTENT-LENGTH: 422 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms { - "console": 2009, + "console": 2010, "name": "PC TEST 1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "startup_script": null, "startup_script_path": null, "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/a0f4ad58-4583-4ec1-9790-4841ca5f6d56", - "vm_id": "a0f4ad58-4583-4ec1-9790-4841ca5f6d56" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/d1808514-893b-4aa5-86c2-c4dea88ff895", + "vm_id": "d1808514-893b-4aa5-86c2-c4dea88ff895" } diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 8dcbfa04..37833633 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4d4e08b5-7efa-4890-bf58-a81cd087964e/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fbf2e4d7-d60e-4e03-95bc-1bd53b74689a/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4d4e08b5-7efa-4890-bf58-a81cd087964e/adapters/0/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fbf2e4d7-d60e-4e03-95bc-1bd53b74689a/adapters/0/ports/0/nio HTTP/1.1 { "lport": 4242, "rhost": "127.0.0.1", @@ -15,7 +15,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt index d62e93b8..2bb604c9 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/75e55a54-4e51-4219-bdb2-f3fe9225cdae/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/1a1b95de-cc91-4a90-870b-5c7c8965eb5d/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/75e55a54-4e51-4219-bdb2-f3fe9225cdae/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/1a1b95de-cc91-4a90-870b-5c7c8965eb5d/reload HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt index ed870b14..ae5a8998 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/29f179ce-e68a-4e77-9fe6-fdb98b308f0c/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/184c6dcc-a8fd-4cc9-b333-86cc24f2e98e/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/29f179ce-e68a-4e77-9fe6-fdb98b308f0c/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/184c6dcc-a8fd-4cc9-b333-86cc24f2e98e/start HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/start diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt index 31a14f3d..4352ce57 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b5eb5059-41ef-41e5-a075-7fe980dbdcf5/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/bc34aac0-6c5e-4b91-b2ea-47b76d4b26f1/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b5eb5059-41ef-41e5-a075-7fe980dbdcf5/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/bc34aac0-6c5e-4b91-b2ea-47b76d4b26f1/stop HTTP/1.1 {} @@ -9,6 +9,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/stop diff --git a/docs/api/examples/post_qemuimg.txt b/docs/api/examples/post_qemuimg.txt index c265f4bf..8fe3d69f 100644 --- a/docs/api/examples/post_qemuimg.txt +++ b/docs/api/examples/post_qemuimg.txt @@ -18,6 +18,6 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/qemu/img diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt index 42117d6c..37a197b0 100644 --- a/docs/api/examples/post_version.txt +++ b/docs/api/examples/post_version.txt @@ -1,8 +1,8 @@ -curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.4.0.dev9"}' +curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.4.0dev13"}' POST /v1/version HTTP/1.1 { - "version": "1.4.0.dev9" + "version": "1.4.0dev13" } @@ -12,9 +12,9 @@ CONNECTION: keep-alive CONTENT-LENGTH: 31 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/version { - "version": "1.4.0.dev9" + "version": "1.4.0dev13" } diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/put_projectsprojectid.txt index 480bdd32..f524c22d 100644 --- a/docs/api/examples/put_projectsprojectid.txt +++ b/docs/api/examples/put_projectsprojectid.txt @@ -1,9 +1,9 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/51887c6f-8fde-40e7-8904-d4e54fcdb7b4' -d '{"name": "second_name", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_update_path_project_non_l0"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/9d7dccbb-0fc0-40d0-9420-912733dcbf74' -d '{"name": "second_name", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-110/test_update_path_project_non_l0"}' -PUT /v1/projects/51887c6f-8fde-40e7-8904-d4e54fcdb7b4 HTTP/1.1 +PUT /v1/projects/9d7dccbb-0fc0-40d0-9420-912733dcbf74 HTTP/1.1 { "name": "second_name", - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_update_path_project_non_l0" + "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-110/test_update_path_project_non_l0" } @@ -13,7 +13,7 @@ CONNECTION: keep-alive CONTENT-LENGTH: 100 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id} { diff --git a/docs/api/examples/put_projectsprojectidiouvmsvmid.txt b/docs/api/examples/put_projectsprojectidiouvmsvmid.txt index 53331a22..55248a93 100644 --- a/docs/api/examples/put_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/put_projectsprojectidiouvmsvmid.txt @@ -1,8 +1,8 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/790ce54d-8d28-4e33-9a5a-27cae20fc0f2' -d '{"console": 2001, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "startup_config_content": "hostname test", "use_default_iou_values": true}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6438493a-152d-4cb0-b8d2-fcfe1f6bf540' -d '{"console": 2002, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "startup_config_content": "hostname test", "use_default_iou_values": true}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/790ce54d-8d28-4e33-9a5a-27cae20fc0f2 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6438493a-152d-4cb0-b8d2-fcfe1f6bf540 HTTP/1.1 { - "console": 2001, + "console": 2002, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, @@ -18,27 +18,27 @@ PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/790ce54d-8d28-4e33 HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 799 +CONTENT-LENGTH: 685 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} { - "console": 2001, + "console": 2002, "ethernet_adapters": 4, - "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcnfdf4ax/iourc", + "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyrljan4a/iourc", "l1_keepalives": true, - "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c", + "md5sum": null, "name": "test", "nvram": 2048, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_iou_update0/iou.bin", + "path": "iou.bin", "private_config": null, "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "ram": 512, "serial_adapters": 0, "startup_config": "startup-config.cfg", "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph6drru9t/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/790ce54d-8d28-4e33-9a5a-27cae20fc0f2", - "vm_id": "790ce54d-8d28-4e33-9a5a-27cae20fc0f2" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2yt9sd1l/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/6438493a-152d-4cb0-b8d2-fcfe1f6bf540", + "vm_id": "6438493a-152d-4cb0-b8d2-fcfe1f6bf540" } diff --git a/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt index cb09ce6b..52872ddf 100644 --- a/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt @@ -1,9 +1,9 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b2e10803-4587-4ff9-9efe-d9e761965dba' -d '{"console": 2001, "hdb_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_update0/linux.img", "name": "test", "ram": 1024}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/578b6391-e461-4f17-86f6-dd556d2f4dde' -d '{"console": 2002, "hdb_disk_image": "linux.img", "name": "test", "ram": 1024}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b2e10803-4587-4ff9-9efe-d9e761965dba HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/578b6391-e461-4f17-86f6-dd556d2f4dde HTTP/1.1 { - "console": 2001, - "hdb_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_update0/linux.img", + "console": 2002, + "hdb_disk_image": "linux.img", "name": "test", "ram": 1024 } @@ -12,10 +12,10 @@ PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b2e10803-4587-4ff HTTP/1.1 200 ACCESS-CONTROL-ALLOW-ORIGIN: * CONNECTION: keep-alive -CONTENT-LENGTH: 1456 +CONTENT-LENGTH: 1358 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} { @@ -25,15 +25,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "boot_priority": "c", "cdrom_image": "", "cdrom_image_md5sum": null, - "console": 2001, + "console": 2002, "console_type": "telnet", "cpu_throttling": 0, "cpus": 1, "hda_disk_image": "", "hda_disk_image_md5sum": null, "hda_disk_interface": "ide", - "hdb_disk_image": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-54/test_qemu_update0/linux.img", - "hdb_disk_image_md5sum": "c4ca4238a0b923820dcc509a6f75849b", + "hdb_disk_image": "linux.img", + "hdb_disk_image_md5sum": null, "hdb_disk_interface": "ide", "hdc_disk_image": "", "hdc_disk_image_md5sum": null, @@ -47,14 +47,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:5d:ba:00", + "mac_address": "00:00:ab:4d:de:00", "name": "test", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3zzynydr/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph3pfurip/qemu-system-x86_64", "ram": 1024, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/b2e10803-4587-4ff9-9efe-d9e761965dba", - "vm_id": "b2e10803-4587-4ff9-9efe-d9e761965dba" + "usage": "", + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/578b6391-e461-4f17-86f6-dd556d2f4dde", + "vm_id": "578b6391-e461-4f17-86f6-dd556d2f4dde" } diff --git a/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt index 12834f4a..b7a858c5 100644 --- a/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt +++ b/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt @@ -1,8 +1,8 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f4886c2a-98fb-471b-bba3-89ea75ad8c27' -d '{"console": 2010, "name": "test"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/aa45d68c-c68e-4296-9550-641b522a73c2' -d '{"console": 2011, "name": "test"}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f4886c2a-98fb-471b-bba3-89ea75ad8c27 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/aa45d68c-c68e-4296-9550-641b522a73c2 HTTP/1.1 { - "console": 2010, + "console": 2011, "name": "test" } @@ -13,14 +13,14 @@ CONNECTION: keep-alive CONTENT-LENGTH: 413 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} { "acpi_shutdown": false, "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)", "adapters": 0, - "console": 2010, + "console": 2011, "enable_remote_console": false, "headless": false, "name": "test", @@ -28,6 +28,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "f4886c2a-98fb-471b-bba3-89ea75ad8c27", + "vm_id": "aa45d68c-c68e-4296-9550-641b522a73c2", "vmname": "VMTEST" } diff --git a/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt index 0024edde..0c1c229e 100644 --- a/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt @@ -1,8 +1,8 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c13cc286-c384-4d39-8fbb-24ce2d9a6024' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/608a4cd0-476c-40ba-95db-0c81effc8e9c' -d '{"console": 2012, "name": "test", "startup_script": "ip 192.168.1.1"}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c13cc286-c384-4d39-8fbb-24ce2d9a6024 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/608a4cd0-476c-40ba-95db-0c81effc8e9c HTTP/1.1 { - "console": 2011, + "console": 2012, "name": "test", "startup_script": "ip 192.168.1.1" } @@ -14,16 +14,16 @@ CONNECTION: keep-alive CONTENT-LENGTH: 438 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.4.0.dev9 +SERVER: Python/3.5 GNS3/1.4.0dev13 X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} { - "console": 2011, + "console": 2012, "name": "test", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "startup_script": "ip 192.168.1.1", "startup_script_path": "startup.vpc", "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpbbmb6tc1/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/c13cc286-c384-4d39-8fbb-24ce2d9a6024", - "vm_id": "c13cc286-c384-4d39-8fbb-24ce2d9a6024" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpqqnauky9/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/608a4cd0-476c-40ba-95db-0c81effc8e9c", + "vm_id": "608a4cd0-476c-40ba-95db-0c81effc8e9c" } diff --git a/docs/api/v1/docker/projectsprojectiddockerimagesidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/docker/projectsprojectiddockerimagesidadaptersadapternumberdportsportnumberdnio.rst index c80e82ab..e5724d50 100644 --- a/docs/api/v1/docker/projectsprojectiddockerimagesidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/docker/projectsprojectiddockerimagesidadaptersadapternumberdportsportnumberdnio.rst @@ -9,8 +9,8 @@ Add a NIO to a Docker container Parameters ********** -- **adapter_number**: Adapter where the nio should be added - **id**: ID of the container +- **adapter_number**: Adapter where the nio should be added - **project_id**: UUID for the project - **port_number**: Port on the adapter @@ -27,8 +27,8 @@ Remove a NIO from a Docker container Parameters ********** -- **adapter_number**: Adapter where the nio should be added - **id**: ID of the container +- **adapter_number**: Adapter where the nio should be added - **project_id**: UUID for the project - **port_number**: Port on the adapter diff --git a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index f82bcb16..b7a216fd 100644 --- a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a Dynamips VM instance Parameters ********** - **adapter_number**: Adapter where the nio should be added -- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -28,8 +28,8 @@ Remove a NIO from a Dynamips VM instance Parameters ********** - **adapter_number**: Adapter from where the nio should be removed -- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 46143c8a..cfebeb84 100644 --- a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -10,8 +10,8 @@ Start a packet capture on a Dynamips VM instance Parameters ********** - **adapter_number**: Adapter to start a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 9042c222..960a0d6f 100644 --- a/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips VM instance Parameters ********** - **adapter_number**: Adapter to stop a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 76550e02..d7411d32 100644 --- a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a IOU instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -34,8 +34,8 @@ Remove a NIO from a IOU instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index fce888b0..e94abb49 100644 --- a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -10,8 +10,8 @@ Start a packet capture on a IOU VM instance Parameters ********** - **adapter_number**: Adapter to start a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 93b8fd8d..13b38095 100644 --- a/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -10,8 +10,8 @@ Stop a packet capture on a IOU VM instance Parameters ********** - **adapter_number**: Adapter to stop a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/project/projects.rst b/docs/api/v1/project/projects.rst index dada2075..13e87bd8 100644 --- a/docs/api/v1/project/projects.rst +++ b/docs/api/v1/project/projects.rst @@ -46,7 +46,7 @@ Output - + diff --git a/docs/api/v1/project/projectsprojectid.rst b/docs/api/v1/project/projectsprojectid.rst index 0772e7d7..ce2e2c8a 100644 --- a/docs/api/v1/project/projectsprojectid.rst +++ b/docs/api/v1/project/projectsprojectid.rst @@ -23,7 +23,7 @@ Output
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
name string Project name
name ['string', 'null'] Project name
path string Directory of the project on the server
project_id string Project UUID
temporary boolean If project is a temporary project
- + @@ -68,7 +68,7 @@ Output
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
name string Project name
name ['string', 'null'] Project name
path string Directory of the project on the server
project_id string Project UUID
temporary boolean If project is a temporary project
- + diff --git a/docs/api/v1/qemu/projectsprojectidqemuvms.rst b/docs/api/v1/qemu/projectsprojectidqemuvms.rst index 57d61b55..3621e2ca 100644 --- a/docs/api/v1/qemu/projectsprojectidqemuvms.rst +++ b/docs/api/v1/qemu/projectsprojectidqemuvms.rst @@ -26,7 +26,7 @@ Input - + @@ -51,6 +51,7 @@ Input + @@ -58,6 +59,7 @@ Input +
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
name string Project name
name ['string', 'null'] Project name
path string Directory of the project on the server
project_id string Project UUID
temporary boolean If project is a temporary project
acpi_shutdown ['boolean', 'null'] ACPI shutdown support
adapter_type ['string', 'null'] QEMU adapter type
adapters ['integer', 'null'] number of adapters
boot_priority enum Possible values: c, d
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
console ['integer', 'null'] console TCP port
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking ['boolean', 'null'] Use QEMU legagy networking commands (-net syntax)
linked_clone boolean either the VM is a linked clone or not
mac_address ['string', 'null'] QEMU MAC address
name string QEMU VM instance name
options ['string', 'null'] Additional QEMU options
process_priority enum Possible values: realtime, very high, high, normal, low, very low, null
qemu_path ['string', 'null'] Path to QEMU
ram ['integer', 'null'] amount of RAM in MB
usage string How to use the qemu VM
vm_id QEMU VM identifier
@@ -103,6 +105,7 @@ Output project_id ✔ string Project uuid qemu_path ✔ string path to QEMU ram ✔ integer amount of RAM in MB + usage ✔ string How to use the qemu VM vm_directory ✔ string vm_id ✔ string QEMU VM uuid diff --git a/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst index c4888dda..caf301ed 100644 --- a/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst +++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst @@ -60,6 +60,7 @@ Output project_id ✔ string Project uuid qemu_path ✔ string path to QEMU ram ✔ integer amount of RAM in MB + usage ✔ string How to use the qemu VM vm_directory ✔ string vm_id ✔ string QEMU VM uuid @@ -128,6 +129,7 @@ Input process_priority enum Possible values: realtime, very high, high, normal, low, very low, null qemu_path ['string', 'null'] Path to QEMU ram ['integer', 'null'] amount of RAM in MB + usage string How to use the qemu VM Output @@ -172,6 +174,7 @@ Output project_id ✔ string Project uuid qemu_path ✔ string path to QEMU ram ✔ integer amount of RAM in MB + usage ✔ string How to use the qemu VM vm_directory ✔ string vm_id ✔ string QEMU VM uuid diff --git a/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 2f51aa70..1da34454 100644 --- a/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a Qemu VM instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -34,8 +34,8 @@ Remove a NIO from a Qemu VM instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/qemu/qemubinaries.rst b/docs/api/v1/qemu/qemubinaries.rst index 6f851195..b04a906c 100644 --- a/docs/api/v1/qemu/qemubinaries.rst +++ b/docs/api/v1/qemu/qemubinaries.rst @@ -13,6 +13,15 @@ Response status codes - **400**: Invalid request - **404**: Instance doesn't exist +Input +******* +.. raw:: html + + + + +
Name Mandatory Type Description
archs array Architectures to filter binaries by
+ Sample session *************** diff --git a/docs/api/v1/qemu/qemucapabilities.rst b/docs/api/v1/qemu/qemucapabilities.rst new file mode 100644 index 00000000..390525df --- /dev/null +++ b/docs/api/v1/qemu/qemucapabilities.rst @@ -0,0 +1,28 @@ +/v1/qemu/capabilities +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +GET /v1/qemu/capabilities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Get a list of Qemu capabilities on this server + +Response status codes +********************** +- **200**: Success + +Output +******* +.. raw:: html + + + + +
Name Mandatory Type Description
kvm array Architectures that KVM is enabled for
+ +Sample session +*************** + + +.. literalinclude:: ../../examples/get_qemucapabilities.txt + diff --git a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 05be923d..bb37508f 100644 --- a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a VirtualBox VM instance Parameters ********** - **adapter_number**: Adapter where the nio should be added -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -34,8 +34,8 @@ Remove a NIO from a VirtualBox VM instance Parameters ********** - **adapter_number**: Adapter from where the nio should be removed -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 7ba235ee..188bc6d5 100644 --- a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -10,8 +10,8 @@ Start a packet capture on a VirtualBox VM instance Parameters ********** - **adapter_number**: Adapter to start a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 1f329813..370f02da 100644 --- a/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -10,8 +10,8 @@ Stop a packet capture on a VirtualBox VM instance Parameters ********** - **adapter_number**: Adapter to stop a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst index e7812909..3e026251 100644 --- a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a VMware VM instance Parameters ********** - **adapter_number**: Adapter where the nio should be added -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -28,8 +28,8 @@ Remove a NIO from a VMware VM instance Parameters ********** - **adapter_number**: Adapter from where the nio should be removed -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 422894cc..f988f5cd 100644 --- a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -10,8 +10,8 @@ Start a packet capture on a VMware VM instance Parameters ********** - **adapter_number**: Adapter to start a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 9f2f4925..23a1980e 100644 --- a/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -10,8 +10,8 @@ Stop a packet capture on a VMware VM instance Parameters ********** - **adapter_number**: Adapter to stop a packet capture -- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index b43d1e1d..c56e69c7 100644 --- a/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -10,8 +10,8 @@ Add a NIO to a VPCS instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes @@ -34,8 +34,8 @@ Remove a NIO from a VPCS instance Parameters ********** - **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **project_id**: UUID for the project - **vm_id**: UUID for the instance Response status codes diff --git a/gns3server/handlers/api/qemu_handler.py b/gns3server/handlers/api/qemu_handler.py index 5f8c40f8..a02f8693 100644 --- a/gns3server/handlers/api/qemu_handler.py +++ b/gns3server/handlers/api/qemu_handler.py @@ -25,7 +25,9 @@ from ...schemas.nio import NIO_SCHEMA from ...schemas.qemu import QEMU_CREATE_SCHEMA from ...schemas.qemu import QEMU_UPDATE_SCHEMA from ...schemas.qemu import QEMU_OBJECT_SCHEMA +from ...schemas.qemu import QEMU_BINARY_FILTER_SCHEMA from ...schemas.qemu import QEMU_BINARY_LIST_SCHEMA +from ...schemas.qemu import QEMU_CAPABILITY_LIST_SCHEMA from ...schemas.qemu import QEMU_IMAGE_CREATE_SCHEMA from ...schemas.vm import VM_LIST_IMAGES_SCHEMA from ...modules.qemu import Qemu @@ -300,10 +302,11 @@ class QEMUHandler: 404: "Instance doesn't exist" }, description="Get a list of available Qemu binaries", + input=QEMU_BINARY_FILTER_SCHEMA, output=QEMU_BINARY_LIST_SCHEMA) def list_binaries(request, response): - binaries = yield from Qemu.binary_list() + binaries = yield from Qemu.binary_list(request.json.get("archs", None)) response.json(binaries) @classmethod @@ -321,6 +324,21 @@ class QEMUHandler: binaries = yield from Qemu.img_binary_list() response.json(binaries) + @Route.get( + r"/qemu/capabilities", + status_codes={ + 200: "Success" + }, + description="Get a list of Qemu capabilities on this server", + output=QEMU_CAPABILITY_LIST_SCHEMA + ) + def get_capabilities(request, response): + capabilities = {"kvm": []} + kvms = yield from Qemu.get_kvm_archs() + if kvms: + capabilities["kvm"] = kvms + response.json(capabilities) + @classmethod @Route.post( r"/qemu/img", diff --git a/gns3server/modules/iou/iou_vm.py b/gns3server/modules/iou/iou_vm.py index e3bdd5b4..1fe6ace1 100644 --- a/gns3server/modules/iou/iou_vm.py +++ b/gns3server/modules/iou/iou_vm.py @@ -676,7 +676,10 @@ class IOUVM(BaseVM): except asyncio.TimeoutError: if self._iouyap_process.returncode is None: log.warn("IOUYAP process {} is still running... killing it".format(self._iouyap_process.pid)) - self._iouyap_process.kill() + try: + self._iouyap_process.kill() + except ProcessLookupError: + pass self._iouyap_process = None self._started = False diff --git a/gns3server/modules/qemu/__init__.py b/gns3server/modules/qemu/__init__.py index a0666444..3ee441b0 100644 --- a/gns3server/modules/qemu/__init__.py +++ b/gns3server/modules/qemu/__init__.py @@ -21,6 +21,7 @@ Qemu server module. import asyncio import os +import platform import sys import re import subprocess @@ -38,6 +39,33 @@ class Qemu(BaseManager): _VM_CLASS = QemuVM + @staticmethod + @asyncio.coroutine + def get_kvm_archs(): + """ + Gets a list of architectures for which KVM is available on this server. + + :returns: List of architectures for which KVM is available on this server. + """ + kvm = [] + + try: + process = yield from asyncio.create_subprocess_exec("kvm-ok") + yield from process.wait() + except OSError: + return kvm + + if process.returncode == 0: + arch = platform.machine() + if arch == "x86_64": + kvm.append("x86_64") + kvm.append("i386") + elif arch == "i386": + kvm.append("i386") + else: + kvm.append(platform.machine()) + return kvm + @staticmethod def paths_list(): """ @@ -82,7 +110,7 @@ class Qemu(BaseManager): return paths @staticmethod - def binary_list(): + def binary_list(archs=None): """ Gets QEMU binaries list available on the host. @@ -96,9 +124,17 @@ class Qemu(BaseManager): if (f.startswith("qemu-system") or f.startswith("qemu-kvm") or f == "qemu" or f == "qemu.exe") and \ os.access(os.path.join(path, f), os.X_OK) and \ os.path.isfile(os.path.join(path, f)): - qemu_path = os.path.join(path, f) - version = yield from Qemu.get_qemu_version(qemu_path) - qemus.append({"path": qemu_path, "version": version}) + if archs is not None: + for arch in archs: + if f.endswith(arch) or f.endswith("{}.exe".format(arch)) or f.endswith("{}w.exe".format(arch)): + qemu_path = os.path.join(path, f) + version = yield from Qemu.get_qemu_version(qemu_path) + qemus.append({"path": qemu_path, "version": version}) + else: + qemu_path = os.path.join(path, f) + version = yield from Qemu.get_qemu_version(qemu_path) + qemus.append({"path": qemu_path, "version": version}) + except OSError: continue diff --git a/gns3server/schemas/qemu.py b/gns3server/schemas/qemu.py index 43af3409..89362fbe 100644 --- a/gns3server/schemas/qemu.py +++ b/gns3server/schemas/qemu.py @@ -601,6 +601,21 @@ QEMU_OBJECT_SCHEMA = { "vm_directory"] } +QEMU_BINARY_FILTER_SCHEMA = { + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Request validation for a list of qemu capabilities", + "properties": { + "archs": { + "description": "Architectures to filter binaries by", + "type": "array", + "items": { + "enum": QEMU_PLATFORMS + } + } + }, + "additionalProperties": False, +} + QEMU_BINARY_LIST_SCHEMA = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Request validation for a list of qemu binaries", @@ -626,6 +641,21 @@ QEMU_BINARY_LIST_SCHEMA = { "additionalProperties": False, } +QEMU_CAPABILITY_LIST_SCHEMA = { + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Request validation for a list of qemu capabilities", + "properties": { + "kvm": { + "description": "Architectures that KVM is enabled for", + "type": "array", + "items": { + "enum": QEMU_PLATFORMS + } + } + }, + "additionalProperties": False, +} + QEMU_IMAGE_CREATE_SCHEMA = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Create a new qemu image. Options can be specific to a format. Read qemu-img manual for more information", diff --git a/tests/handlers/api/test_qemu.py b/tests/handlers/api/test_qemu.py index de512993..619b13fd 100644 --- a/tests/handlers/api/test_qemu.py +++ b/tests/handlers/api/test_qemu.py @@ -200,11 +200,24 @@ def test_qemu_list_binaries(server, vm): {"path": "/tmp/2", "version": "2.1.0"}] with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock: response = server.get("/qemu/binaries".format(project_id=vm["project_id"]), example=True) - assert mock.called + assert mock.called_with(None) assert response.status == 200 assert response.json == ret +def test_qemu_list_binaries_filter(server, vm): + ret = [ + {"path": "/tmp/x86_64", "version": "2.2.0"}, + {"path": "/tmp/alpha", "version": "2.1.0"}, + {"path": "/tmp/i386", "version": "2.1.0"} + ] + with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock: + response = server.get("/qemu/binaries".format(project_id=vm["project_id"]), body={"archs": ["i386"]}, example=True) + assert response.status == 200 + assert mock.called_with(["i386"]) + assert response.json == ret + + def test_vms(server, tmpdir, fake_qemu_vm): with patch("gns3server.modules.Qemu.get_images_directory", return_value=str(tmpdir), example=True): @@ -312,3 +325,9 @@ def test_create_img_absolute_local(server): response = server.post("/qemu/img", body=body, example=True) assert response.status == 201 + + +def test_capabilities(server): + with asyncio_patch("gns3server.modules.Qemu.get_kvm_archs", return_value=["x86_64"]): + response = server.get("/qemu/capabilities", example=True) + assert response.json["kvm"] == ["x86_64"] diff --git a/tests/modules/qemu/test_qemu_manager.py b/tests/modules/qemu/test_qemu_manager.py index 36ede5bb..38da1cbf 100644 --- a/tests/modules/qemu/test_qemu_manager.py +++ b/tests/modules/qemu/test_qemu_manager.py @@ -20,6 +20,7 @@ import stat import asyncio import sys import pytest +import platform from gns3server.modules.qemu import Qemu from gns3server.modules.qemu.qemu_error import QemuError @@ -58,18 +59,32 @@ def test_binary_list(loop): os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR) with asyncio_patch("gns3server.modules.qemu.subprocess_check_output", return_value="QEMU emulator version 2.2.0, Copyright (c) 2003-2008 Fabrice Bellard") as mock: - qemus = loop.run_until_complete(asyncio.async(Qemu.binary_list())) - if sys.platform.startswith("win"): version = "" else: version = "2.2.0" + qemus = loop.run_until_complete(asyncio.async(Qemu.binary_list())) + assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x86"), "version": version} in qemus assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": version} in qemus assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": version} in qemus assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": version} not in qemus + qemus = loop.run_until_complete(asyncio.async(Qemu.binary_list(["x86"]))) + + assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x86"), "version": version} in qemus + assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": version} not in qemus + assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": version} not in qemus + assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": version} not in qemus + + qemus = loop.run_until_complete(asyncio.async(Qemu.binary_list(["x86", "x42"]))) + + assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x86"), "version": version} in qemus + assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": version} not in qemus + assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": version} in qemus + assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": version} not in qemus + def test_img_binary_list(loop): @@ -160,3 +175,21 @@ def test_create_image_exist(loop, tmpdir, fake_qemu_img_binary): with pytest.raises(QemuError): loop.run_until_complete(asyncio.async(Qemu.instance().create_disk(fake_qemu_img_binary, "hda.qcow2", options))) assert not process.called + + +def test_get_kvm_archs_no_kvm(loop): + with asyncio_patch("asyncio.create_subprocess_exec", side_effect=FileNotFoundError('kvm-ok')): + archs = loop.run_until_complete(asyncio.async(Qemu.get_kvm_archs())) + assert archs == [] + + +def test_get_kvm_archs_kvm_ok(loop): + + process = MagicMock() + with asyncio_patch("asyncio.create_subprocess_exec", return_value=process): + process.returncode = 0 + archs = loop.run_until_complete(asyncio.async(Qemu.get_kvm_archs())) + if platform.machine() == 'x86_64': + assert archs == ['x86_64', 'i386'] + else: + assert archs == platform.machine() diff --git a/tests/utils.py b/tests/utils.py index b8994f66..cb3b4f39 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -50,6 +50,11 @@ class _asyncio_patch: future = asyncio.Future() if "return_value" in self.kwargs: future.set_result(self.kwargs["return_value"]) + elif "side_effect" in self.kwargs: + if isinstance(self.kwargs["side_effect"], Exception): + future.set_exception(self.kwargs["side_effect"]) + else: + raise NotImplementedError else: future.set_result(True) return future