diff --git a/docs/api/examples/delete_projectuuid.txt b/docs/api/examples/delete_projectuuid.txt index 9d63e2e0..68989437 100644 --- a/docs/api/examples/delete_projectuuid.txt +++ b/docs/api/examples/delete_projectuuid.txt @@ -5,9 +5,9 @@ DELETE /project/{uuid} 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: /project/{uuid} diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt index 7e21daff..9489d231 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/get_interfaces.txt @@ -5,48 +5,36 @@ GET /interfaces HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 520 +CONNECTION: close +CONTENT-LENGTH: 364 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": "vmnet8", + "name": "vmnet8" }, { - "id": "fw0", - "name": "fw0" - }, - { - "id": "en2", - "name": "en2" - }, - { - "id": "p2p0", - "name": "p2p0" - }, - { - "id": "bridge0", - "name": "bridge0" + "id": "vboxnet0", + "name": "vboxnet0" } ] diff --git a/docs/api/examples/get_projectuuid.txt b/docs/api/examples/get_projectuuid.txt index 2388771c..bed046ad 100644 --- a/docs/api/examples/get_projectuuid.txt +++ b/docs/api/examples/get_projectuuid.txt @@ -5,11 +5,11 @@ GET /project/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 102 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: /project/{uuid} { 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 446e6e1c..a482bfd4 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: 375 +CONNECTION: close +CONTENT-LENGTH: 348 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} { @@ -19,9 +19,8 @@ X-ROUTE: /virtualbox/{uuid} "console": 2001, "enable_remote_console": false, "headless": false, - "linked_clone": false, "name": "VMTEST", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "be1fa0fe-cd51-41e0-9806-2bac0f5f50ba", + "uuid": "7d0bf59f-0a8c-4382-b5ed-23902653d8c5", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt index 4112dde4..c45b8878 100644 --- a/docs/api/examples/get_vpcsuuid.txt +++ b/docs/api/examples/get_vpcsuuid.txt @@ -5,11 +5,11 @@ GET /vpcs/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 213 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} { @@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid} "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "a474c92d-c9d2-4f53-bbe2-64493f8f07cc" + "uuid": "5af7ac19-3064-4c8d-8355-fb0c933bbf37" } diff --git a/docs/api/examples/post_projectuuidclose.txt b/docs/api/examples/post_projectuuidclose.txt index 03ae88bc..d038c178 100644 --- a/docs/api/examples/post_projectuuidclose.txt +++ b/docs/api/examples/post_projectuuidclose.txt @@ -5,9 +5,9 @@ POST /project/{uuid}/close 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: /project/{uuid}/close diff --git a/docs/api/examples/post_projectuuidcommit.txt b/docs/api/examples/post_projectuuidcommit.txt index 2fe9c38f..b5d0c2d9 100644 --- a/docs/api/examples/post_projectuuidcommit.txt +++ b/docs/api/examples/post_projectuuidcommit.txt @@ -5,9 +5,9 @@ POST /project/{uuid}/commit 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: /project/{uuid}/commit 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 3eff439d..60213f89 100644 --- a/docs/api/examples/post_virtualbox.txt +++ b/docs/api/examples/post_virtualbox.txt @@ -10,11 +10,11 @@ POST /virtualbox HTTP/1.1 HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 369 +CONNECTION: close +CONTENT-LENGTH: 342 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 { @@ -24,9 +24,8 @@ X-ROUTE: /virtualbox "console": 2000, "enable_remote_console": false, "headless": false, - "linked_clone": false, "name": "VM1", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "8b5bbfa3-0682-4d65-ae8b-a1aea9dc40e5", + "uuid": "4cdea9da-6611-44c3-a085-a3bc4dae7883", "vmname": "VM1" } diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt index 2eadd535..4f23a01a 100644 --- a/docs/api/examples/post_vpcs.txt +++ b/docs/api/examples/post_vpcs.txt @@ -8,11 +8,11 @@ POST /vpcs HTTP/1.1 HTTP/1.1 201 -CONNECTION: keep-alive +CONNECTION: close CONTENT-LENGTH: 213 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 { @@ -21,5 +21,5 @@ X-ROUTE: /vpcs "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "688ff2f8-08c5-4218-8e19-99f1ac7fc20d" + "uuid": "2cefa3e7-6867-4282-a606-c42d94c7852e" } diff --git a/docs/api/examples/put_projectuuid.txt b/docs/api/examples/put_projectuuid.txt index 998473c6..472b1d5e 100644 --- a/docs/api/examples/put_projectuuid.txt +++ b/docs/api/examples/put_projectuuid.txt @@ -7,15 +7,15 @@ PUT /project/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 158 +CONNECTION: close +CONTENT-LENGTH: 114 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: /project/{uuid} { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpf9hmfoxi", + "location": "/tmp/tmpjan_7gw5", "temporary": false, - "uuid": "6cc80657-e8f3-445b-8c1a-e2081ac7d042" + "uuid": "88146503-b509-40a4-ae43-0f17100c767a" } diff --git a/docs/api/virtualbox.rst b/docs/api/virtualbox.rst index 384b366e..d1f40822 100644 --- a/docs/api/virtualbox.rst +++ b/docs/api/virtualbox.rst @@ -19,7 +19,12 @@ Input + + + + + @@ -40,7 +45,6 @@ Output - diff --git a/docs/api/virtualboxuuid.rst b/docs/api/virtualboxuuid.rst index c744a107..aea02b3a 100644 --- a/docs/api/virtualboxuuid.rst +++ b/docs/api/virtualboxuuid.rst @@ -28,7 +28,6 @@ Output - @@ -84,7 +83,6 @@ Output - diff --git a/gns3server/handlers/virtualbox_handler.py b/gns3server/handlers/virtualbox_handler.py index 69ddba1a..ef074d51 100644 --- a/gns3server/handlers/virtualbox_handler.py +++ b/gns3server/handlers/virtualbox_handler.py @@ -26,6 +26,7 @@ from ..modules.virtualbox import VirtualBox class VirtualBoxHandler: + """ API entry points for VirtualBox. """ diff --git a/gns3server/modules/nios/nio.py b/gns3server/modules/nios/nio.py index eee5f1d5..3c8a6b9e 100644 --- a/gns3server/modules/nios/nio.py +++ b/gns3server/modules/nios/nio.py @@ -21,6 +21,7 @@ Base interface for NIOs. class NIO(object): + """ Network Input/Output. """ diff --git a/gns3server/modules/port_manager.py b/gns3server/modules/port_manager.py index 1a5f294f..d70548fc 100644 --- a/gns3server/modules/port_manager.py +++ b/gns3server/modules/port_manager.py @@ -25,6 +25,7 @@ log = logging.getLogger(__name__) class PortManager: + """ :param host: IP address to bind for console connections """ diff --git a/gns3server/modules/project.py b/gns3server/modules/project.py index 86985f42..afd6c271 100644 --- a/gns3server/modules/project.py +++ b/gns3server/modules/project.py @@ -30,6 +30,7 @@ log = logging.getLogger(__name__) class Project: + """ A project contains a list of VM. In theory VM are isolated project/project. diff --git a/gns3server/modules/virtualbox/virtualbox_vm.py b/gns3server/modules/virtualbox/virtualbox_vm.py index 047dea45..a01479a9 100644 --- a/gns3server/modules/virtualbox/virtualbox_vm.py +++ b/gns3server/modules/virtualbox/virtualbox_vm.py @@ -43,6 +43,7 @@ log = logging.getLogger(__name__) class VirtualBoxVM(BaseVM): + """ VirtualBox VM implementation. """ diff --git a/tests/api/test_virtualbox.py b/tests/api/test_virtualbox.py index 51c17495..4c7a7e5c 100644 --- a/tests/api/test_virtualbox.py +++ b/tests/api/test_virtualbox.py @@ -89,9 +89,9 @@ def test_vbox_reload(server, vm): def test_vbox_nio_create_udp(server, vm): response = server.post("/virtualbox/{}/adapters/0/nio".format(vm["uuid"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, example=True) assert response.status == 201 assert response.route == "/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio" @@ -100,9 +100,9 @@ def test_vbox_nio_create_udp(server, vm): def test_vbox_delete_nio(server, vm): server.post("/virtualbox/{}/adapters/0/nio".format(vm["uuid"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}) + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}) response = server.delete("/virtualbox/{}/adapters/0/nio".format(vm["uuid"]), example=True) assert response.status == 204 assert response.route == "/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio"
Name Mandatory Type Description
adapter_start_index integer adapter index from which to start using adapters
adapter_type string VirtualBox adapter type
adapters integer number of adapters
console integer console TCP port
enable_remote_console boolean enable the remote console
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
console integer console TCP port
enable_remote_console boolean enable the remote console
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
uuid string VirtualBox VM instance UUID
console integer console TCP port
enable_remote_console boolean enable the remote console
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
uuid string VirtualBox VM instance UUID
console integer console TCP port
enable_remote_console boolean enable the remote console
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
uuid string VirtualBox VM instance UUID