diff --git a/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt b/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt index cf775417..2ad343a5 100644 --- a/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt +++ b/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt @@ -5,9 +5,9 @@ DELETE /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1 HTTP/1.1 204 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio diff --git a/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt index c2a772f2..3a17f8b1 100644 --- a/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt +++ b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt @@ -5,9 +5,9 @@ DELETE /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1 HTTP/1.1 204 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /vpcs/{uuid}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt index 74381d7e..289c74e0 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/get_interfaces.txt @@ -5,56 +5,32 @@ GET /interfaces HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 652 +CONNECTION: close +CONTENT-LENGTH: 298 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /interfaces [ { - "id": "lo0", - "name": "lo0" + "id": "lo", + "name": "lo" }, { - "id": "gif0", - "name": "gif0" + "id": "eth0", + "name": "eth0" }, { - "id": "stf0", - "name": "stf0" + "id": "wlan0", + "name": "wlan0" }, { - "id": "en0", - "name": "en0" + "id": "vmnet1", + "name": "vmnet1" }, { - "id": "en1", - "name": "en1" - }, - { - "id": "fw0", - "name": "fw0" - }, - { - "id": "en2", - "name": "en2" - }, - { - "id": "p2p0", - "name": "p2p0" - }, - { - "id": "bridge0", - "name": "bridge0" - }, - { - "id": "vboxnet0", - "name": "vboxnet0" - }, - { - "id": "vboxnet1", - "name": "vboxnet1" + "id": "vmnet8", + "name": "vmnet8" } ] diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt index 39509cda..59bdb128 100644 --- a/docs/api/examples/get_version.txt +++ b/docs/api/examples/get_version.txt @@ -5,11 +5,11 @@ GET /version HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 29 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /version { diff --git a/docs/api/examples/get_virtualboxuuid.txt b/docs/api/examples/get_virtualboxuuid.txt index 4322211e..3ed0b071 100644 --- a/docs/api/examples/get_virtualboxuuid.txt +++ b/docs/api/examples/get_virtualboxuuid.txt @@ -5,11 +5,11 @@ GET /virtualbox/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 348 +CONNECTION: close +CONTENT-LENGTH: 346 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /virtualbox/{uuid} { @@ -20,7 +20,7 @@ X-ROUTE: /virtualbox/{uuid} "enable_remote_console": false, "headless": false, "name": "VMTEST", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "c6b74706-54b6-405d-8aea-9c48a94987e8", + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", + "uuid": "f246f72b-9f79-4a60-a8fb-0b2375d29d28", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt index 5aab7abd..2d191100 100644 --- a/docs/api/examples/get_vpcsuuid.txt +++ b/docs/api/examples/get_vpcsuuid.txt @@ -5,18 +5,18 @@ GET /vpcs/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 213 +CONNECTION: close +CONTENT-LENGTH: 211 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /vpcs/{uuid} { "console": 2003, "name": "PC TEST 1", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "aceec3c0-f02d-44ee-88a6-85c3120c22ca" + "uuid": "0300d8a7-e971-4402-bd85-8c12384d308d" } diff --git a/docs/api/examples/post_portsudp.txt b/docs/api/examples/post_portsudp.txt index 8e7ea7f1..ff13ecb6 100644 --- a/docs/api/examples/post_portsudp.txt +++ b/docs/api/examples/post_portsudp.txt @@ -5,11 +5,11 @@ POST /ports/udp HTTP/1.1 HTTP/1.1 201 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 25 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /ports/udp { diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt index 1d4ecc7d..45ef1069 100644 --- a/docs/api/examples/post_version.txt +++ b/docs/api/examples/post_version.txt @@ -7,11 +7,11 @@ POST /version HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 29 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /version { diff --git a/docs/api/examples/post_virtualbox.txt b/docs/api/examples/post_virtualbox.txt index 62e5fe4e..4ed3b787 100644 --- a/docs/api/examples/post_virtualbox.txt +++ b/docs/api/examples/post_virtualbox.txt @@ -1,20 +1,20 @@ -curl -i -X POST 'http://localhost:8000/virtualbox' -d '{"linked_clone": false, "name": "VM1", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "vmname": "VM1"}' +curl -i -X POST 'http://localhost:8000/virtualbox' -d '{"linked_clone": false, "name": "VM1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "vmname": "VM1"}' POST /virtualbox HTTP/1.1 { "linked_clone": false, "name": "VM1", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "vmname": "VM1" } HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 342 +CONNECTION: close +CONTENT-LENGTH: 340 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /virtualbox { @@ -25,7 +25,7 @@ X-ROUTE: /virtualbox "enable_remote_console": false, "headless": false, "name": "VM1", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "7ba9ddf4-0a6a-48a0-8483-3450a9f305df", + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", + "uuid": "210fbbba-4025-4286-81dc-1f07cc494cc9", "vmname": "VM1" } diff --git a/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt index f3caae78..04674eef 100644 --- a/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt +++ b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt @@ -10,11 +10,11 @@ POST /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1 HTTP/1.1 201 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio { diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt index 054660c9..c2ea6413 100644 --- a/docs/api/examples/post_vpcs.txt +++ b/docs/api/examples/post_vpcs.txt @@ -1,25 +1,25 @@ -curl -i -X POST 'http://localhost:8000/vpcs' -d '{"name": "PC TEST 1", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80"}' +curl -i -X POST 'http://localhost:8000/vpcs' -d '{"name": "PC TEST 1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80"}' POST /vpcs HTTP/1.1 { "name": "PC TEST 1", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80" + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80" } HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 213 +CONNECTION: close +CONTENT-LENGTH: 211 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /vpcs { "console": 2001, "name": "PC TEST 1", - "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", + "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "896e7bbd-936c-4a6f-9268-c89f8eb91f5e" + "uuid": "92ff89ed-aed2-487c-b893-5559ca258d0f" } diff --git a/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt index b3bbb41f..82abf86c 100644 --- a/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt +++ b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt @@ -10,11 +10,11 @@ POST /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1 HTTP/1.1 201 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 +SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /vpcs/{uuid}/ports/{port_number:\d+}/nio { diff --git a/docs/api/virtualbox.rst b/docs/api/virtualbox.rst index d1f40822..d85ef101 100644 --- a/docs/api/virtualbox.rst +++ b/docs/api/virtualbox.rst @@ -27,7 +27,7 @@ Input headless boolean headless mode linked_clone ✔ boolean either the VM is a linked clone or not name ✔ string VirtualBox VM instance name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID uuid string VirtualBox VM instance UUID vbox_id integer VirtualBox VM instance ID (for project created before GNS3 1.3) vmname ✔ string VirtualBox VM name (in VirtualBox itself) @@ -46,7 +46,7 @@ Output enable_remote_console boolean enable the remote console headless boolean headless mode name ✔ string VirtualBox VM instance name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID uuid ✔ string VirtualBox VM instance UUID vmname string VirtualBox VM name (in VirtualBox itself) diff --git a/docs/api/virtualboxuuid.rst b/docs/api/virtualboxuuid.rst index aea02b3a..c9dfaa58 100644 --- a/docs/api/virtualboxuuid.rst +++ b/docs/api/virtualboxuuid.rst @@ -29,7 +29,7 @@ Output enable_remote_console boolean enable the remote console headless boolean headless mode name ✔ string VirtualBox VM instance name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID uuid ✔ string VirtualBox VM instance UUID vmname string VirtualBox VM name (in VirtualBox itself) @@ -84,7 +84,7 @@ Output enable_remote_console boolean enable the remote console headless boolean headless mode name ✔ string VirtualBox VM instance name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID uuid ✔ string VirtualBox VM instance UUID vmname string VirtualBox VM name (in VirtualBox itself) diff --git a/docs/api/virtualboxuuidadaptersadapteriddnio.rst b/docs/api/virtualboxuuidadaptersadapteriddnio.rst index 6aa6a0c7..843fcd0b 100644 --- a/docs/api/virtualboxuuidadaptersadapteriddnio.rst +++ b/docs/api/virtualboxuuidadaptersadapteriddnio.rst @@ -9,8 +9,8 @@ Add a NIO to a VirtualBox VM instance Parameters ********** -- **adapter_id**: Adapter where the nio should be added - **uuid**: Instance UUID +- **adapter_id**: Adapter where the nio should be added Response status codes ********************** @@ -31,8 +31,8 @@ Remove a NIO from a VirtualBox VM instance Parameters ********** -- **adapter_id**: Adapter from where the nio should be removed - **uuid**: Instance UUID +- **adapter_id**: Adapter from where the nio should be removed Response status codes ********************** diff --git a/docs/api/virtualboxuuidcaptureadapteriddstart.rst b/docs/api/virtualboxuuidcaptureadapteriddstart.rst index f3581528..d7db9429 100644 --- a/docs/api/virtualboxuuidcaptureadapteriddstart.rst +++ b/docs/api/virtualboxuuidcaptureadapteriddstart.rst @@ -9,8 +9,8 @@ Start a packet capture on a VirtualBox VM instance Parameters ********** -- **adapter_id**: Adapter to start a packet capture - **uuid**: Instance UUID +- **adapter_id**: Adapter to start a packet capture Response status codes ********************** diff --git a/docs/api/virtualboxuuidcaptureadapteriddstop.rst b/docs/api/virtualboxuuidcaptureadapteriddstop.rst index dddfcd95..c4067108 100644 --- a/docs/api/virtualboxuuidcaptureadapteriddstop.rst +++ b/docs/api/virtualboxuuidcaptureadapteriddstop.rst @@ -9,8 +9,8 @@ Stop a packet capture on a VirtualBox VM instance Parameters ********** -- **adapter_id**: Adapter to stop a packet capture - **uuid**: Instance UUID +- **adapter_id**: Adapter to stop a packet capture Response status codes ********************** diff --git a/docs/api/vpcs.rst b/docs/api/vpcs.rst index 8344add3..36c55b71 100644 --- a/docs/api/vpcs.rst +++ b/docs/api/vpcs.rst @@ -21,7 +21,7 @@ Input Name Mandatory Type Description console ['integer', 'null'] console TCP port name ✔ string VPCS device name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID startup_script ['string', 'null'] Content of the VPCS startup script uuid string VPCS device UUID vpcs_id integer VPCS device instance ID (for project created before GNS3 1.3) @@ -35,7 +35,7 @@ Output Name Mandatory Type Description console ✔ integer console TCP port name ✔ string VPCS device name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID script_file ['string', 'null'] VPCS startup script startup_script ['string', 'null'] Content of the VPCS startup script uuid ✔ string VPCS device UUID diff --git a/docs/api/vpcsuuid.rst b/docs/api/vpcsuuid.rst index d0b3f136..67c2883a 100644 --- a/docs/api/vpcsuuid.rst +++ b/docs/api/vpcsuuid.rst @@ -24,7 +24,7 @@ Output Name Mandatory Type Description console ✔ integer console TCP port name ✔ string VPCS device name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID script_file ['string', 'null'] VPCS startup script startup_script ['string', 'null'] Content of the VPCS startup script uuid ✔ string VPCS device UUID @@ -70,7 +70,7 @@ Output Name Mandatory Type Description console ✔ integer console TCP port name ✔ string VPCS device name - project_uuid ✔ string Project UUID + project_id ✔ string Project UUID script_file ['string', 'null'] VPCS startup script startup_script ['string', 'null'] Content of the VPCS startup script uuid ✔ string VPCS device UUID diff --git a/docs/api/vpcsuuidportsportnumberdnio.rst b/docs/api/vpcsuuidportsportnumberdnio.rst index dc3870b1..e16cd3f9 100644 --- a/docs/api/vpcsuuidportsportnumberdnio.rst +++ b/docs/api/vpcsuuidportsportnumberdnio.rst @@ -9,8 +9,8 @@ Add a NIO to a VPCS instance Parameters ********** -- **port_number**: Port where the nio should be added - **uuid**: Instance UUID +- **port_number**: Port where the nio should be added Response status codes ********************** @@ -31,8 +31,8 @@ Remove a NIO from a VPCS instance Parameters ********** -- **port_number**: Port from where the nio should be removed - **uuid**: Instance UUID +- **port_number**: Port from where the nio should be removed Response status codes ********************** diff --git a/gns3server/handlers/virtualbox_handler.py b/gns3server/handlers/virtualbox_handler.py index dfb8da7a..74202c50 100644 --- a/gns3server/handlers/virtualbox_handler.py +++ b/gns3server/handlers/virtualbox_handler.py @@ -59,7 +59,7 @@ class VirtualBoxHandler: vbox_manager = VirtualBox.instance() vm = yield from vbox_manager.create_vm(request.json.pop("name"), - request.json.pop("project_uuid"), + request.json.pop("project_id"), request.json.get("uuid"), request.json.pop("vmname"), request.json.pop("linked_clone"),