Example #1
0
    def execute_vboxmanage(self, subcommand, args, timeout=60):

        from gns3.modules.virtualbox import VirtualBox
        virtualbox_settings = VirtualBox.instance().settings()
        vboxmanage_path = virtualbox_settings["vboxmanage_path"]
        command = [vboxmanage_path, "--nologo", subcommand]
        command.extend(args)
        log.debug("Executing VBoxManage with command: {}".format(command))
        return self._process_check_output(command, timeout=timeout)
Example #2
0
    def execute_vboxmanage(self, subcommand, args, timeout=60):

        from gns3.modules.virtualbox import VirtualBox
        virtualbox_settings = VirtualBox.instance().settings()
        vboxmanage_path = virtualbox_settings["vboxmanage_path"]
        command = [vboxmanage_path, "--nologo", subcommand]
        command.extend(args)
        log.debug("Executing VBoxManage with command: {}".format(command))
        return self._process_check_output(command, timeout=timeout)
Example #3
0
    def execute_vboxmanage(subcommand, args, timeout=60):

        from gns3.modules.virtualbox import VirtualBox
        virtualbox_settings = VirtualBox.instance().settings()
        vboxmanage_path = virtualbox_settings["vboxmanage_path"]
        command = [vboxmanage_path, "--nologo", subcommand]
        command.extend(args)
        log.debug("Executing VBoxManage with command: {}".format(command))
        output = subprocess.check_output(command, timeout=timeout)
        return output.decode("utf-8", errors="ignore").strip()
Example #4
0
    def execute_vboxmanage(subcommand, args, timeout=60):

        from gns3.modules.virtualbox import VirtualBox
        virtualbox_settings = VirtualBox.instance().settings()
        vboxmanage_path = virtualbox_settings["vboxmanage_path"]
        command = [vboxmanage_path, "--nologo", subcommand]
        command.extend(args)
        log.debug("Executing VBoxManage with command: {}".format(command))
        output = subprocess.check_output(command, timeout=timeout)
        return output.decode("utf-8", errors="ignore").strip()
Example #5
0
def virtualbox_vm(local_server, project):

    from gns3.modules.virtualbox.virtualbox_vm import VirtualBoxVM
    from gns3.modules.virtualbox import VirtualBox

    vm = VirtualBoxVM(VirtualBox(), local_server, project)
    vm._node_id = str(uuid.uuid4())
    vm._settings = {"name": "VBOX1",
                    "vmname": "VBOX1",
                    "console": None,
                    "adapters": 0,
                    "ram": 0,
                    "use_any_adapter": False,
                    "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
                    "headless": False}
    vm.setInitialized(True)
    return vm
Example #6
0
    "firewall": 3,
    "guest": 2,
    "switch": 1,
    "multilayer_switch": 1,
    "router": 0
}

TEMPLATE_TYPE_TO_CONFIGURATION_PAGE = {
    "ethernet_switch": Builtin.configurationPage("ethernet_switch"),
    "ethernet_hub": Builtin.configurationPage("ethernet_hub"),
    "cloud": Builtin.configurationPage("cloud"),
    "dynamips": Dynamips.configurationPage(),
    "iou": IOU.configurationPage(),
    "vpcs": VPCS.configurationPage(),
    "traceng": TraceNG.configurationPage(),
    "virtualbox": VirtualBox.configurationPage(),
    "qemu": Qemu.configurationPage(),
    "vmware": VMware.configurationPage(),
    "docker": Docker.configurationPage()
}


class NodesView(QtWidgets.QTreeWidget):
    """
    Nodes view to list the nodes.

    :param parent: parent widget
    """
    def __init__(self, parent=None):

        super().__init__(parent)
Example #7
0
    "firewall": 3,
    "guest": 2,
    "switch": 1,
    "multilayer_switch": 1,
    "router": 0
}

TEMPLATE_TYPE_TO_CONFIGURATION_PAGE = {
    "ethernet_switch": Builtin.configurationPage("ethernet_switch"),
    "ethernet_hub": Builtin.configurationPage("ethernet_hub"),
    "cloud": Builtin.configurationPage("cloud"),
    "dynamips": Dynamips.configurationPage(),
    "iou": IOU.configurationPage(),
    "vpcs": VPCS.configurationPage(),
    "traceng": TraceNG.configurationPage(),
    "virtualbox": VirtualBox.configurationPage(),
    "qemu": Qemu.configurationPage(),
    "vmware": VMware.configurationPage(),
    "docker": Docker.configurationPage()
}


class NodesView(QtWidgets.QTreeWidget):

    """
    Nodes view to list the nodes.

    :param parent: parent widget
    """

    def __init__(self, parent=None):