示例#1
0
 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
0
    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])
示例#3
0
 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")
示例#4
0
    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])