Exemple #1
0
    def __init__(self, responsible, netcfg, current_netcfg, config_file, component, ha_status):
        self.responsible = responsible
        self.current_netcfg = current_netcfg
        self.netcfg = netcfg
        self.component = component
        self.core = component.core
        self.ha_status = ha_status
        self.config_file = config_file
        self.temp_file = None
        self.backup_file = None
        for function_name in ('critical error warning info debug'.split()):
            setattr(self, function_name, getattr(component, function_name))

        if EDENWALL:
            self.prev_ha_status = readHaType(component.ufwi_conf_var_dir)
            self.debug("current HA state : %s (previous : %s)" % (self.ha_status, self.prev_ha_status))
        else:
            self.prev_ha_status = ENOHA

        self.down_interfaces, self.up_interfaces = self.changed_interfaces_names()
        self.speed_changed = self.changed_ethernets_speeds()

        self.critical("down_interfaces: %s " % self.down_interfaces)
        self.critical("up_interfaces: %s " % self.up_interfaces)
Exemple #2
0
 def _readHaType(self):
     return readHaType(self.core.config.get('CORE', 'vardir'))