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


Python ConfigManager.get_web_interface_list方法代碼示例

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


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

示例1: __load_configuration

# 需要導入模塊: from config.configmanager import ConfigManager [as 別名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_list [as 別名]
 def __load_configuration(cls):
     logging.debug("Load configuration")
     cls._routers = ConfigManager.get_routers_list()
     for i, r in enumerate(cls._routers):
         if len(ConfigManager.get_web_interface_list()) >= i:
             if 'node_name' in ConfigManager.get_web_interface_list()[i]:
                 r.node_name = ConfigManager.get_web_interface_list()[i]['node_name']
     cls._power_strips = ConfigManager.get_power_strip_list()
     cls._test_sets = ConfigManager.get_test_sets()
開發者ID:PumucklOnTheAir,項目名稱:TestFramework,代碼行數:11,代碼來源:server.py

示例2: test_setup_expert

# 需要導入模塊: from config.configmanager import ConfigManager [as 別名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_list [as 別名]
    def test_setup_expert(self):
        """
        This UnitTest executes the wca_setup_expert-function with the given config-file.
        It sets the values of all the  from WebInterface of the Router.
        """
        print("Test if the 'wca_setup_wizard'-function is working")
        router = self._create_router()
        # NVAssisten
        nv_assist = NVAssistent("eth0")
        nv_assist.create_namespace_vlan(router)
        # Set netns for the current process
        netns.setns(router.namespace_name)
        try:
            # Config
            config = ConfigManager.get_web_interface_list()[router.id]
            self.assertEqual(len(config), 30, "Wrong size of the Config-Directory")

            print("Set the following configuration: \n" + str(config))

            router_web_config = RouterWebConfiguration(router, config, wizard=True)
            router_web_config.start()
            router_web_config.join()
        except Exception as e:
            nv_assist.close()
            raise e

        assert router.mode == Mode.normal
        nv_assist.close()
開發者ID:PumucklOnTheAir,項目名稱:TestFramework,代碼行數:30,代碼來源:test_M_web_configuration_assist_wizard.py

示例3: test_web_interface_list

# 需要導入模塊: from config.configmanager import ConfigManager [as 別名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_list [as 別名]
 def test_web_interface_list(self):
     """
     Tests the web interface config
     :return: Tests results
     """
     data = ConfigManager.get_web_interface_list()
     self.assertEqual(len(data), 60, "web_interface_Yaml: Wrong size of the List")
開發者ID:codedust,項目名稱:TestFramework,代碼行數:9,代碼來源:test_Yaml.py

示例4: setup_web_configuration

# 需要導入模塊: from config.configmanager import ConfigManager [as 別名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_list [as 別名]
    def setup_web_configuration(cls, router_ids: Union[List[int], None], setup_all: bool, wizard: bool):
        """
        After a systemupgrade, the Router starts in config-mode without the possibility to connect again via SSH.
        Therefore this class uses selenium to parse the given webpage. All options given by the web interface of the
        Router can be set via the 'web_interface_config.yaml', except for the sysupgrade which isn't implemented yet.

        :param router_ids: List of unique numbers to identify a Router
        :param setup_all: If True all Routers will be setuped via the webinterface
        :param wizard
        """

        if setup_all:
            for router in cls.get_routers():
                cls.start_job(router, RouterWebConfigurationJob(ConfigManager.get_web_interface_list()[router.id], wizard))
        else:
            for router_id in router_ids:
                router = cls.get_router_by_id(router_id)
                cls.start_job(router, RouterWebConfigurationJob(ConfigManager.get_web_interface_list()[router_id], wizard))
開發者ID:PumucklOnTheAir,項目名稱:TestFramework,代碼行數:20,代碼來源:server.py


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