當前位置: 首頁>>代碼示例>>Python>>正文


Python EthernetPort.longNameType方法代碼示例

本文整理匯總了Python中gns3.ports.ethernet_port.EthernetPort.longNameType方法的典型用法代碼示例。如果您正苦於以下問題:Python EthernetPort.longNameType方法的具體用法?Python EthernetPort.longNameType怎麽用?Python EthernetPort.longNameType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gns3.ports.ethernet_port.EthernetPort的用法示例。


在下文中一共展示了EthernetPort.longNameType方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    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()
開發者ID:bluca,項目名稱:gns3-gui,代碼行數:30,代碼來源:vpcs_device.py

示例2: _addAdapters

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    def _addAdapters(self, adapters):
        """
        Adds adapters.

        :param adapters: number of adapters
        """

        for port_number in range(0, adapters):
            port_name = EthernetPort.longNameType() + str(port_number)
            new_port = EthernetPort(port_name)
            new_port.setPortNumber(port_number)
            self._ports.append(new_port)
            log.debug("port {} has been added".format(port_name))
開發者ID:shaneutt,項目名稱:gns3-gui,代碼行數:15,代碼來源:qemu_vm.py

示例3: _addAdapters

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    def _addAdapters(self, adapters):
        """
        Adds adapters.

        :param adapters: number of adapters
        """

        for port_number in range(0, self._settings["adapter_start_index"] + adapters):
            if port_number < self._settings["adapter_start_index"]:
                continue
            port_name = EthernetPort.longNameType() + str(port_number)
            new_port = EthernetPort(port_name)
            new_port.setPortNumber(port_number)
            new_port.setPacketCaptureSupported(True)
            self._ports.append(new_port)
            log.debug("port {} has been added".format(port_name))
開發者ID:Jatinamin,項目名稱:gns3-gui,代碼行數:18,代碼來源:virtualbox_vm.py

示例4: _addAdapters

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    def _addAdapters(self, adapters):
        """
        Adds adapters.

        :param adapters: number of adapters
        """

        for adapter_number in range(0, adapters):
            adapter_name = EthernetPort.longNameType() + str(adapter_number)
            short_name = EthernetPort.shortNameType() + str(adapter_number)
            new_port = EthernetPort(adapter_name)
            new_port.setShortName(short_name)
            new_port.setAdapterNumber(adapter_number)
            new_port.setPortNumber(0)
            new_port.setPacketCaptureSupported(True)
            self._ports.append(new_port)
            log.debug("Adapter {} has been added".format(adapter_name))
開發者ID:bluca,項目名稱:gns3-gui,代碼行數:19,代碼來源:virtualbox_vm.py

示例5: __init__

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    def __init__(self, module, server, project):
        super().__init__(module, server, project)

        log.info("VPCS instance is being created")
        self._vm_id = None
        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))
開發者ID:guili618,項目名稱:gns3-gui,代碼行數:22,代碼來源:vpcs_device.py

示例6: __init__

# 需要導入模塊: from gns3.ports.ethernet_port import EthernetPort [as 別名]
# 或者: from gns3.ports.ethernet_port.EthernetPort import longNameType [as 別名]
    def __init__(self, module, server):
        Node.__init__(self, server)

        log.info("VPCS instance is being created")
        self._vpcs_id = None
        self._defaults = {}
        self._inital_settings = None
        self._loading = False
        self._module = module
        self._ports = []
        self._settings = {"name": "",
                          "script_file": "",
                          "console": None}

        port_name = EthernetPort.longNameType() + str(0)
        port = EthernetPort(port_name)
        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()
開發者ID:madkrell,項目名稱:gns3-gui,代碼行數:24,代碼來源:vpcs_device.py


注:本文中的gns3.ports.ethernet_port.EthernetPort.longNameType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。