当前位置: 首页>>代码示例>>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;未经允许,请勿转载。