def _wca_setup_wizard(self, config):
        """
        Starts the WebConfigurationAssist and
        sets the values provided by the wizard-mode (in the WebConfiguration).

        :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
        """
        try:
            # remote_sytem has to be a router object
            wca = WebConfigurationAssist(config, self.router)
            wca.setup_wizard()
            wca.exit()
        except Exception as e:
            logging.error("%s" + str(e), LoggerSetup.get_log_deep(2))
            raise e
        # The Router should reboot
        logging.info("%sWait until Router rebooted (90sec) ...", LoggerSetup.get_log_deep(2))
        time.sleep(90)

        try:
            Dhclient.update_ip(self.router.vlan_iface_name)
            self._success_handling()
        except FileExistsError:
            self._success_handling()
        except Exception:
            self._exception_handling()
 def _wca_setup_wizard(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the wizard-mode (in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.router)
         wca.setup_wizard()
         wca.exit()
     except Exception as e:
         Logger().error(str(e), 2)
         raise e
    def _wca_setup_wizard(self, config):
        """
        Starts the WebConfigurationAssist and
        sets the values provided by the wizard-mode (in the WebConfiguration).

        :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
        """
        try:
            # remote_sytem has to be a router object
            wca = WebConfigurationAssist(config, self.router)
            wca.setup_wizard()
            wca.exit()
        except Exception as e:
            logging.error("%s" + str(e), LoggerSetup.get_log_deep(2))
            raise e
        # The Router should reboot
        logging.info("%sWait until Router rebooted (90sec) ...",
                     LoggerSetup.get_log_deep(2))
        time.sleep(90)

        try:
            Dhclient.update_ip(self.router.vlan_iface_name)
            self._success_handling()
        except FileExistsError:
            self._success_handling()
        except Exception:
            self._exception_handling()
 def _wca_setup_wizard(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the wizard-mode (in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.router)
         wca.setup_wizard()
         wca.exit()
     except Exception as e:
         logging.error(str(e), 2)
         raise e
     # The Router should reboot
     logging.info("Wait until Router rebooted (45sec) ...")
     time.sleep(45)
     if Dhclient.update_ip(self.router.vlan_iface_name) == 0:
         self.router.mode = Mode.normal
         logging.info("%s[+] Router was set into normal mode", LoggerSetup.get_log_deep(2))
     else:
         logging.warning("[!] Couldn't get a new IP for Router(" + str(self.router.id) + ")")
Пример #5
0
 def _wca_setup_wizard(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the wizard-mode (in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.router)
         wca.setup_wizard()
         wca.exit()
     except Exception as e:
         Logger().error(str(e), 2)
         raise e
 def _wca_setup_wizard(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the wizard-mode (in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.router)
         wca.setup_wizard()
         wca.exit()
     except Exception as e:
         logging.error(str(e), 2)
         raise e
     # The Router should reboot
     logging.info("Wait until Router rebooted (45sec) ...")
     time.sleep(45)
     if Dhclient.update_ip(self.router.vlan_iface_name) == 0:
         self.router.mode = Mode.normal
         logging.info("%s[+] Router was set into normal mode",
                      LoggerSetup.get_log_deep(2))
     else:
         logging.warning("[!] Couldn't get a new IP for Router(" +
                         str(self.router.id) + ")")
 def wca_setup_expert(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the expert-mode(in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.remote_system)
         wca.setup_expert_private_wlan()
         wca.setup_expert_remote_access()
         wca.setup_expert_network()
         wca.setup_expert_mesh_vpn()
         wca.setup_expert_wlan()
         wca.setup_expert_autoupdate()
         wca.exit()
     except Exception as e:
         Logger().error(str(e), 2)
         self.exit()
         raise e
Пример #8
0
 def _wca_setup_expert(self, config):
     """
     Starts the WebConfigurationAssist and
     sets the values provided by the expert-mode(in the WebConfiguration)
     :param config: {node_name, mesh_vpn, limit_bandwidth, show_location, latitude, longitude, altitude, contact,...}
     """
     try:
         # remote_sytem has to be a router object
         wca = WebConfigurationAssist(config, self.router)
         wca.setup_expert_private_wlan()
         wca.setup_expert_remote_access()
         wca.setup_expert_network()
         wca.setup_expert_mesh_vpn()
         wca.setup_expert_wlan()
         wca.setup_expert_autoupdate()
     except Exception as e:
         Logger().error(str(e), 2)
         raise e