Fixes remote server issue when creating a new project while already in a project.

This commit is contained in:
Jeremy 2014-11-14 19:59:06 -07:00
parent e75dde3ebf
commit e2e4f4f38b
7 changed files with 10 additions and 4 deletions

View File

@ -269,6 +269,7 @@ class Dynamips(IModule):
self.delete_dynamips_files()
self._hypervisor_manager = None
self._working_dir = self._projects_dir
log.info("dynamips module has been reset")
def start_hypervisor_manager(self):

View File

@ -196,6 +196,7 @@ class IOU(IModule):
self._allocated_udp_ports.clear()
self.delete_iourc_file()
self._working_dir = self._projects_dir
log.info("IOU module has been reset")
@IModule.route("iou.settings")

View File

@ -124,6 +124,7 @@ class Qemu(IModule):
self._qemu_instances.clear()
self._allocated_udp_ports.clear()
self._working_dir = self._projects_dir
log.info("QEMU module has been reset")
@IModule.route("qemu.settings")

View File

@ -73,7 +73,7 @@ class VirtualBox(IModule):
# look for vboxmanage in the current working directory and $PATH
for path in paths:
try:
if "vboxmanage" in os.listdir(path) and os.access(os.path.join(path, "vboxmanage"), os.X_OK):
if "vboxmanage" in [s.lower() for s in os.listdir(path)] and os.access(os.path.join(path, "vboxmanage"), os.X_OK):
self._vboxmanage_path = os.path.join(path, "vboxmanage")
break
except OSError:
@ -152,6 +152,7 @@ class VirtualBox(IModule):
self._vbox_instances.clear()
self._allocated_udp_ports.clear()
self._working_dir = self._projects_dir
log.info("VirtualBox module has been reset")
@IModule.route("virtualbox.settings")
@ -742,7 +743,7 @@ class VirtualBox(IModule):
if not vboxmanage_path or not os.path.exists(vboxmanage_path):
raise VirtualBoxError("Could not find VBoxManage, is VirtualBox correctly installed?")
command = [self._vboxmanage_path, "--nologo", "list", "vms"]
command = [vboxmanage_path, "--nologo", "list", "vms"]
result = self._execute_vboxmanage(command)
except VirtualBoxError as e:
self.send_custom_error(str(e))

View File

@ -740,8 +740,7 @@ class VirtualBoxVM(object):
for adapter_id in range(len(self._ethernet_adapters), self._maximum_adapters):
log.debug("disabling remaining adapter {}".format(adapter_id))
self._modify_vm("--cableconnected{} off".format(adapter_id + 1))
self._modify_vm("--nic{} null".format(adapter_id + 1))
self._modify_vm("--nic{} none".format(adapter_id + 1))
def _create_linked_clone(self):

View File

@ -140,6 +140,7 @@ class VPCS(IModule):
self._vpcs_instances.clear()
self._allocated_udp_ports.clear()
self._working_dir = self._projects_dir
log.info("VPCS module has been reset")
@IModule.route("vpcs.settings")

View File

@ -48,6 +48,8 @@ setup(
"tornado>=3.1",
"pyzmq>=14.0.0",
"jsonschema>=2.3.0"
"apache-libcloud>=0.14.1",
"requests",
],
entry_points={
"console_scripts": [