diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt
index 616653fe..64beb7dd 100644
--- a/docs/api/examples/get_vpcsuuid.txt
+++ b/docs/api/examples/get_vpcsuuid.txt
@@ -13,10 +13,10 @@ SERVER: Python/3.4 aiohttp/0.13.1
X-ROUTE: /vpcs/{uuid}
{
- "console": 2001,
+ "console": 2003,
"name": "PC TEST 1",
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"script_file": null,
"startup_script": null,
- "uuid": "b37ef237-15aa-46a7-bdc5-8fa8657056c6"
+ "uuid": "624e94fb-9e7e-45d0-a27d-4eeda19e98cd"
}
diff --git a/docs/api/examples/post_virtualbox.txt b/docs/api/examples/post_virtualbox.txt
index 7b051df4..7142eb82 100644
--- a/docs/api/examples/post_virtualbox.txt
+++ b/docs/api/examples/post_virtualbox.txt
@@ -11,7 +11,7 @@ POST /virtualbox HTTP/1.1
HTTP/1.1 201
CONNECTION: close
-CONTENT-LENGTH: 348
+CONTENT-LENGTH: 369
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 aiohttp/0.13.1
@@ -21,11 +21,12 @@ X-ROUTE: /virtualbox
"adapter_start_index": 0,
"adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
"adapters": 0,
+ "console": 2000,
"enable_remote_console": false,
"headless": false,
"linked_clone": false,
"name": "VM1",
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
- "uuid": "767b6b21-2209-4d73-aec8-49e4a332709d",
+ "uuid": "bd6e0124-bb4b-4224-a71f-9a28c302df4e",
"vmname": "VM1"
}
diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt
index 2c8403fb..9e657633 100644
--- a/docs/api/examples/post_vpcs.txt
+++ b/docs/api/examples/post_vpcs.txt
@@ -16,10 +16,10 @@ SERVER: Python/3.4 aiohttp/0.13.1
X-ROUTE: /vpcs
{
- "console": 2000,
+ "console": 2001,
"name": "PC TEST 1",
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"script_file": null,
"startup_script": null,
- "uuid": "076902d4-97d2-4243-b4fb-374a381d4bc5"
+ "uuid": "fc2b4d10-e4c6-4545-8b59-cd7a09bc3d33"
}
diff --git a/docs/api/examples/put_projectuuid.txt b/docs/api/examples/put_projectuuid.txt
index 90ba05a1..2b1f5409 100644
--- a/docs/api/examples/put_projectuuid.txt
+++ b/docs/api/examples/put_projectuuid.txt
@@ -15,7 +15,7 @@ SERVER: Python/3.4 aiohttp/0.13.1
X-ROUTE: /project/{uuid}
{
- "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmps4qnfnar",
+ "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2d1dq1sb",
"temporary": false,
- "uuid": "b3eccaca-af01-4244-a3fd-da1fb98d04c9"
+ "uuid": "7a6d9fd4-c212-4368-950f-5513e518313a"
}
diff --git a/docs/api/projectuuid.rst b/docs/api/projectuuid.rst
index 5eebd0bf..fd846a10 100644
--- a/docs/api/projectuuid.rst
+++ b/docs/api/projectuuid.rst
@@ -5,7 +5,7 @@
GET /project/**{uuid}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Get project informations
+Get project information
Parameters
**********
diff --git a/docs/api/virtualbox.rst b/docs/api/virtualbox.rst
index b880491b..384b366e 100644
--- a/docs/api/virtualbox.rst
+++ b/docs/api/virtualbox.rst
@@ -10,7 +10,7 @@ Create a new VirtualBox VM instance
Response status codes
**********************
- **400**: Invalid project UUID
-- **201**: VirtualBox VM instance created
+- **201**: Instance created
- **409**: Conflict
Input
@@ -19,6 +19,7 @@ Input
Name | Mandatory | Type | Description |
+ console | | integer | console TCP port |
linked_clone | ✔ | boolean | either the VM is a linked clone or not |
name | ✔ | string | VirtualBox VM instance name |
project_uuid | ✔ | string | Project UUID |
diff --git a/docs/api/virtualboxuuidreload.rst b/docs/api/virtualboxuuidreload.rst
index 49fc6fab..9a56133f 100644
--- a/docs/api/virtualboxuuidreload.rst
+++ b/docs/api/virtualboxuuidreload.rst
@@ -9,11 +9,11 @@ Reload a VirtualBox VM instance
Parameters
**********
-- **uuid**: VirtualBox VM instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VirtualBox VM instance UUID
-- **404**: VirtualBox VM instance doesn't exist
-- **204**: VirtualBox VM instance reloaded
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance reloaded
diff --git a/docs/api/virtualboxuuidresume.rst b/docs/api/virtualboxuuidresume.rst
index 5d45900b..dc8e616d 100644
--- a/docs/api/virtualboxuuidresume.rst
+++ b/docs/api/virtualboxuuidresume.rst
@@ -9,11 +9,11 @@ Resume a suspended VirtualBox VM instance
Parameters
**********
-- **uuid**: VirtualBox VM instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VirtualBox VM instance UUID
-- **404**: VirtualBox VM instance doesn't exist
-- **204**: VirtualBox VM instance resumed
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance resumed
diff --git a/docs/api/virtualboxuuidstart.rst b/docs/api/virtualboxuuidstart.rst
index f60d7c22..2e9662d7 100644
--- a/docs/api/virtualboxuuidstart.rst
+++ b/docs/api/virtualboxuuidstart.rst
@@ -9,13 +9,13 @@ Start a VirtualBox VM instance
Parameters
**********
-- **uuid**: VirtualBox VM instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VirtualBox VM instance UUID
-- **404**: VirtualBox VM instance doesn't exist
-- **204**: VirtualBox VM instance started
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance started
Sample session
***************
diff --git a/docs/api/virtualboxuuidstop.rst b/docs/api/virtualboxuuidstop.rst
index d8a58373..e19340b9 100644
--- a/docs/api/virtualboxuuidstop.rst
+++ b/docs/api/virtualboxuuidstop.rst
@@ -9,13 +9,13 @@ Stop a VirtualBox VM instance
Parameters
**********
-- **uuid**: VirtualBox VM instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VirtualBox VM instance UUID
-- **404**: VirtualBox VM instance doesn't exist
-- **204**: VirtualBox VM instance stopped
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance stopped
Sample session
***************
diff --git a/docs/api/virtualboxuuidsuspend.rst b/docs/api/virtualboxuuidsuspend.rst
index abb9a98c..90512c7a 100644
--- a/docs/api/virtualboxuuidsuspend.rst
+++ b/docs/api/virtualboxuuidsuspend.rst
@@ -9,11 +9,11 @@ Suspend a VirtualBox VM instance
Parameters
**********
-- **uuid**: VirtualBox VM instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VirtualBox VM instance UUID
-- **404**: VirtualBox VM instance doesn't exist
-- **204**: VirtualBox VM instance suspended
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance suspended
diff --git a/docs/api/vpcs.rst b/docs/api/vpcs.rst
index c525760a..69318c8b 100644
--- a/docs/api/vpcs.rst
+++ b/docs/api/vpcs.rst
@@ -10,7 +10,7 @@ Create a new VPCS instance
Response status codes
**********************
- **400**: Invalid project UUID
-- **201**: VPCS instance created
+- **201**: Instance created
- **409**: Conflict
Input
diff --git a/docs/api/vpcsuuid.rst b/docs/api/vpcsuuid.rst
index 664df1bf..d13361a7 100644
--- a/docs/api/vpcsuuid.rst
+++ b/docs/api/vpcsuuid.rst
@@ -9,12 +9,26 @@ Get a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
- **200**: Success
-- **404**: VPCS instance doesn't exist
+- **404**: Instance doesn't exist
+
+Output
+*******
+.. raw:: html
+
+
+ Name | Mandatory | Type | Description |
+ console | ✔ | integer | console TCP port |
+ name | ✔ | string | VPCS device name |
+ project_uuid | ✔ | 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 |
+
Sample session
***************
@@ -29,13 +43,13 @@ Update a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **200**: VPCS instance updated
+- **200**: Instance updated
- **409**: Conflict
-- **404**: VPCS instance doesn't exist
+- **404**: Instance doesn't exist
Input
*******
@@ -70,10 +84,10 @@ Delete a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **404**: VPCS instance doesn't exist
-- **204**: VPCS instance deleted
+- **404**: Instance doesn't exist
+- **204**: Instance deleted
diff --git a/docs/api/vpcsuuidreload.rst b/docs/api/vpcsuuidreload.rst
index 728a34cf..93c24a52 100644
--- a/docs/api/vpcsuuidreload.rst
+++ b/docs/api/vpcsuuidreload.rst
@@ -5,15 +5,15 @@
POST /vpcs/**{uuid}**/reload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Remove a NIO from a VPCS
+Reload a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
-- **400**: Invalid VPCS instance UUID
-- **404**: VPCS instance doesn't exist
-- **204**: VPCS reloaded
+- **400**: Invalid instance UUID
+- **404**: Instance doesn't exist
+- **204**: Instance reloaded
diff --git a/docs/api/vpcsuuidstart.rst b/docs/api/vpcsuuidstart.rst
index 4acce2fc..aa02e25d 100644
--- a/docs/api/vpcsuuidstart.rst
+++ b/docs/api/vpcsuuidstart.rst
@@ -9,11 +9,11 @@ Start a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
- **400**: Invalid VPCS instance UUID
-- **404**: VPCS instance doesn't exist
-- **204**: VPCS instance started
+- **404**: Instance doesn't exist
+- **204**: Instance started
diff --git a/docs/api/vpcsuuidstop.rst b/docs/api/vpcsuuidstop.rst
index 3b6e76fe..a11f183f 100644
--- a/docs/api/vpcsuuidstop.rst
+++ b/docs/api/vpcsuuidstop.rst
@@ -9,11 +9,11 @@ Stop a VPCS instance
Parameters
**********
-- **uuid**: VPCS instance UUID
+- **uuid**: Instance UUID
Response status codes
**********************
- **400**: Invalid VPCS instance UUID
-- **404**: VPCS instance doesn't exist
-- **204**: VPCS instance stopped
+- **404**: Instance doesn't exist
+- **204**: Instance stopped
diff --git a/gns3server/modules/port_manager.py b/gns3server/modules/port_manager.py
index b03a4025..1a5f294f 100644
--- a/gns3server/modules/port_manager.py
+++ b/gns3server/modules/port_manager.py
@@ -51,7 +51,6 @@ class PortManager:
else:
self._console_host = host
- assert not hasattr(PortManager, "_instance")
PortManager._instance = self
@classmethod
diff --git a/gns3server/modules/virtualbox/virtualbox_vm.py b/gns3server/modules/virtualbox/virtualbox_vm.py
index 4873607d..f2137c93 100644
--- a/gns3server/modules/virtualbox/virtualbox_vm.py
+++ b/gns3server/modules/virtualbox/virtualbox_vm.py
@@ -428,7 +428,7 @@ class VirtualBoxVM(BaseVM):
log.info("VirtualBox VM '{name}' [{uuid}] has set the VM name to '{vmname}'".format(name=self.name, uuid=self.uuid, vmname=vmname))
# TODO: test linked clone
- #if self._linked_clone:
+ # if self._linked_clone:
# yield from self._modify_vm('--name "{}"'.format(vmname))
self._vmname = vmname
diff --git a/gns3server/utils/interfaces.py b/gns3server/utils/interfaces.py
index 5359dfbb..701bce48 100644
--- a/gns3server/utils/interfaces.py
+++ b/gns3server/utils/interfaces.py
@@ -89,7 +89,7 @@ def interfaces():
import netifaces
for interface in netifaces.interfaces():
results.append({"id": interface,
- "name": interface})
+ "name": interface})
except ImportError:
return
else:
diff --git a/tests/modules/virtualbox/test_virtualbox_manager.py b/tests/modules/virtualbox/test_virtualbox_manager.py
index 4521691b..fde3ca5b 100644
--- a/tests/modules/virtualbox/test_virtualbox_manager.py
+++ b/tests/modules/virtualbox/test_virtualbox_manager.py
@@ -41,4 +41,4 @@ def test_vm_non_executable_vboxmanage_path(project, manager):
tmpfile = tempfile.NamedTemporaryFile()
with patch("gns3server.config.Config.get_section_config", return_value={"vboxmanage_path": tmpfile.name}):
with pytest.raises(VirtualBoxError):
- manager.find_vboxmanage()
\ No newline at end of file
+ manager.find_vboxmanage()