Ejemplo n.º 1
0
def get_rich_rule_enabled(zone, rule):
    # Convert the rule string to standard format
    # before checking whether it is present
    rule = str(Rich_Rule(rule_str=rule))
    if rule in fw.getRichRules(zone):
        return True
    else:
        return False
Ejemplo n.º 2
0
 def get_enabled_immediate(self, rule, timeout):
     # Convert the rule string to standard format
     # before checking whether it is present
     rule = str(Rich_Rule(rule_str=rule))
     if rule in self.fw.getRichRules(self.zone):
         return True
     else:
         return False
Ejemplo n.º 3
0
 def get_enabled_permanent(self, rule, timeout):
     fw_zone, fw_settings = self.get_fw_zone_settings()
     # Convert the rule string to standard format
     # before checking whether it is present
     rule = str(Rich_Rule(rule_str=rule))
     if rule in fw_settings.getRichRules():
         return True
     else:
         return False
def get_rich_rule_enabled_permanent(zone, rule):
    fw_zone = fw.config().getZoneByName(zone)
    fw_settings = fw_zone.getSettings()
    # Convert the rule string to standard format
    # before checking whether it is present
    rule = str(Rich_Rule(rule_str=rule))
    if rule in fw_settings.getRichRules():
        return True
    else:
        return False