本文整理汇总了Python中config.configmanager.ConfigManager.get_web_interface_config方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigManager.get_web_interface_config方法的具体用法?Python ConfigManager.get_web_interface_config怎么用?Python ConfigManager.get_web_interface_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.configmanager.ConfigManager
的用法示例。
在下文中一共展示了ConfigManager.get_web_interface_config方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_web_interface_config
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_config [as 别名]
def test_web_interface_config(self):
"""
Tests the web interface config
:return: Tests results
"""
data = ConfigManager.get_web_interface_config()
self.assertEqual(len(data), 2, "web_interface_Yaml: Wrong size of the List")
示例2: setup_web_configuration
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_web_interface_config [as 别名]
def setup_web_configuration(cls, router_ids: List[int], setup_all: 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
"""
from util.router_setup_web_configuration import RouterWebConfiguration
if setup_all:
for i, router in enumerate(cls.get_routers()):
RouterWebConfiguration.setup(router, ConfigManager.get_web_interface_config()[i])
else:
for i, router_id in enumerate(router_ids):
router = cls.get_router_by_id(router_id)
RouterWebConfiguration.setup(router, ConfigManager.get_web_interface_config()[i])