def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("QEMU VM instance is being created") self._defaults = {} self._inital_settings = None self._export_directory = None self._loading = False self._module = module self._ports = [] self._settings = {"name": "", "qemu_path": "", "hda_disk_image": "", "hdb_disk_image": "", "hdc_disk_image": "", "hdd_disk_image": "", "options": "", "ram": QEMU_VM_SETTINGS["ram"], "console": None, "adapters": QEMU_VM_SETTINGS["adapters"], "adapter_type": QEMU_VM_SETTINGS["adapter_type"], "legacy_networking": QEMU_VM_SETTINGS["legacy_networking"], "cpu_throttling": QEMU_VM_SETTINGS["cpu_throttling"], "process_priority": QEMU_VM_SETTINGS["process_priority"], "initrd": "", "kernel_image": "", "kernel_command_line": ""} self._addAdapters(1) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("QEMU VM instance is being created") self._ports = [] self._settings = { "name": "", "qemu_path": "", "hda_disk_image": "", "hdb_disk_image": "", "hdc_disk_image": "", "hdd_disk_image": "", "options": "", "ram": QEMU_VM_SETTINGS["ram"], "console": None, "adapters": QEMU_VM_SETTINGS["adapters"], "adapter_type": QEMU_VM_SETTINGS["adapter_type"], "legacy_networking": QEMU_VM_SETTINGS["legacy_networking"], "cpu_throttling": QEMU_VM_SETTINGS["cpu_throttling"], "process_priority": QEMU_VM_SETTINGS["process_priority"], "initrd": "", "kernel_image": "", "kernel_command_line": "", }
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("QEMU VM instance is being created") self._ports = [] self._settings = { "name": "", "qemu_path": "", "hda_disk_image": "", "hdb_disk_image": "", "hdc_disk_image": "", "hdd_disk_image": "", "options": "", "ram": QEMU_VM_SETTINGS["ram"], "console": None, "adapters": QEMU_VM_SETTINGS["adapters"], "adapter_type": QEMU_VM_SETTINGS["adapter_type"], "legacy_networking": QEMU_VM_SETTINGS["legacy_networking"], "cpu_throttling": QEMU_VM_SETTINGS["cpu_throttling"], "process_priority": QEMU_VM_SETTINGS["process_priority"], "initrd": "", "kernel_image": "", "kernel_command_line": "" }
def __init__(self, module, server, project): VM.__init__(self, server, server, project) log.info("IOU instance is being created") self._vm_id = None self._defaults = {} self._inital_settings = None self._loading = False self._module = module self._export_directory = None self._ports = [] self._settings = {"name": "", "path": "", "initial_config": "", "l1_keepalives": False, "use_default_iou_values": IOU_DEVICE_SETTINGS["use_default_iou_values"], "ram": IOU_DEVICE_SETTINGS["ram"], "nvram": IOU_DEVICE_SETTINGS["nvram"], "ethernet_adapters": IOU_DEVICE_SETTINGS["ethernet_adapters"], "serial_adapters": IOU_DEVICE_SETTINGS["serial_adapters"], "console": None, "iourc_content": None} # self._occupied_slots = [] self._addAdapters(2, 2) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("VPCS instance is being created") self._vm_id = None self._defaults = {} self._export_directory = None self._loading = False self._ports = [] self._settings = {"name": "", "script_file": "", "startup_script": None, "startup_script_path": None, "console": None} port_name = EthernetPort.longNameType() + str(0) short_name = EthernetPort.shortNameType() + str(0) # VPCS devices have only one Ethernet port port = EthernetPort(port_name) port.setShortName(short_name) port.setAdapterNumber(0) port.setPortNumber(0) self._ports.append(port) log.debug("port {} has been added".format(port_name)) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, server, server, project) log.info("IOU instance is being created") self._vm_id = None self._defaults = {} self._loading = False self._module = module self._export_directory = None self._ports = [] self._settings = { "name": "", "path": "", "initial_config": "", "l1_keepalives": False, "use_default_iou_values": IOU_DEVICE_SETTINGS["use_default_iou_values"], "ram": IOU_DEVICE_SETTINGS["ram"], "nvram": IOU_DEVICE_SETTINGS["nvram"], "ethernet_adapters": IOU_DEVICE_SETTINGS["ethernet_adapters"], "serial_adapters": IOU_DEVICE_SETTINGS["serial_adapters"], "console": None, "iourc_content": None } # 2 Ethernet adapters and 2 Serial adapters by default self._addAdapters(2, 2) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("VPCS instance is being created") self._vm_id = None self._defaults = {} self._inital_settings = None self._export_directory = None self._loading = False self._ports = [] self._settings = { "name": "", "script_file": "", "startup_script": None, "startup_script_path": None, "console": None } port_name = EthernetPort.longNameType() + str(0) short_name = EthernetPort.shortNameType() + str(0) # VPCS devices have only one Ethernet port port = EthernetPort(port_name) port.setShortName(short_name) port.setAdapterNumber(0) port.setPortNumber(0) self._ports.append(port) log.debug("port {} has been added".format(port_name)) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("QEMU VM instance is being created") self._defaults = {} self._export_directory = None self._loading = False self._module = module self._ports = [] self._settings = { "name": "", "qemu_path": "", "hda_disk_image": "", "hdb_disk_image": "", "hdc_disk_image": "", "hdd_disk_image": "", "options": "", "ram": QEMU_VM_SETTINGS["ram"], "console": None, "adapters": QEMU_VM_SETTINGS["adapters"], "adapter_type": QEMU_VM_SETTINGS["adapter_type"], "legacy_networking": QEMU_VM_SETTINGS["legacy_networking"], "cpu_throttling": QEMU_VM_SETTINGS["cpu_throttling"], "process_priority": QEMU_VM_SETTINGS["process_priority"], "initrd": "", "kernel_image": "", "kernel_command_line": "" } self._addAdapters(1) # save the default settings self._defaults = self._settings.copy()
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("VirtualBox VM instance is being created") self._linked_clone = False self._ports = [] self._settings = {"name": "", "vmname": "", "console": None, "adapters": VBOX_VM_SETTINGS["adapters"], "use_any_adapter": VBOX_VM_SETTINGS["use_any_adapter"], "adapter_type": VBOX_VM_SETTINGS["adapter_type"], "ram": VBOX_VM_SETTINGS["ram"], "headless": VBOX_VM_SETTINGS["headless"], "enable_remote_console": VBOX_VM_SETTINGS["enable_remote_console"]}
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("VirtualBox VM instance is being created") self._linked_clone = False self._ports = [] self._settings = { "name": "", "vmname": "", "console": None, "adapters": VBOX_VM_SETTINGS["adapters"], "use_any_adapter": VBOX_VM_SETTINGS["use_any_adapter"], "adapter_type": VBOX_VM_SETTINGS["adapter_type"], "ram": VBOX_VM_SETTINGS["ram"], "headless": VBOX_VM_SETTINGS["headless"], "enable_remote_console": VBOX_VM_SETTINGS["enable_remote_console"] }
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("IOU instance is being created") self._vm_id = None self._ports = [] self._settings = {"name": "", "path": "", "initial_config": "", "l1_keepalives": False, "use_default_iou_values": IOU_DEVICE_SETTINGS["use_default_iou_values"], "ram": IOU_DEVICE_SETTINGS["ram"], "nvram": IOU_DEVICE_SETTINGS["nvram"], "ethernet_adapters": IOU_DEVICE_SETTINGS["ethernet_adapters"], "serial_adapters": IOU_DEVICE_SETTINGS["serial_adapters"], "console": None, "iourc_content": None}
def __init__(self, module, server, project, platform="c7200"): VM.__init__(self, module, server, project) log.info("Router {} is being created".format(platform)) self._ports = [] self._dynamips_id = None self._loading = False self._export_directory = None self._defaults = {} self._settings = { "name": "", "platform": platform, "image": "", "startup_config": "", "private_config": "", "ram": 128, "nvram": 128, "mmap": True, "sparsemem": True, "clock_divisor": 8, "idlepc": "", "idlemax": 500, "idlesleep": 30, "exec_area": 64, "disk0": 0, "disk1": 0, "console": None, "aux": None, "mac_addr": None, "system_id": "FTX0945W0MY", "slot0": None, "slot1": None, "slot2": None, "slot3": None, "slot4": None, "slot5": None, "slot6": None, "wic0": None, "wic1": None, "wic2": None }
def __init__(self, module, server, project, platform="c7200"): VM.__init__(self, module, server, project) log.info("Router {} is being created".format(platform)) self._ports = [] self._dynamips_id = None self._loading = False self._export_directory = None self._defaults = {} self._settings = {"name": "", "platform": platform, "image": "", "startup_config": "", "private_config": "", "ram": 128, "nvram": 128, "mmap": True, "sparsemem": True, "clock_divisor": 8, "idlepc": "", "idlemax": 500, "idlesleep": 30, "exec_area": 64, "disk0": 0, "disk1": 0, "console": None, "aux": None, "mac_addr": None, "system_id": "FTX0945W0MY", "slot0": None, "slot1": None, "slot2": None, "slot3": None, "slot4": None, "slot5": None, "slot6": None, "wic0": None, "wic1": None, "wic2": None}
def __init__(self, module, server, project): VM.__init__(self, module, server, project) log.info("VPCS instance is being created") self._vm_id = None self._ports = [] self._settings = { "name": "", "startup_script": None, "startup_script_path": None, "console": None } port_name = EthernetPort.longNameType() + str(0) short_name = EthernetPort.shortNameType() + str(0) # VPCS devices have only one fixed Ethernet port port = EthernetPort(port_name) port.setShortName(short_name) port.setAdapterNumber(0) port.setPortNumber(0) self._ports.append(port) log.debug("port {} has been added".format(port_name))