Exemple #1
0
    def __init__(self, window, rule_type, rule_class):
        Model.__init__(self, window, rule_type)
        self.compatibility = window.compatibility
        self.rule_type = rule_type
        self.name = rule_type
        self.rule_class = rule_class
        self.enabled = True

        # identifier (int) => AclIPv4, AclIPv6 or Nat object
        self.rules = {}

        # chain key => InputChain, OutputChain or ForwardChain
        # eg. chain=("eth0", "eth2") or chain="INPUT"
        self.chains = odict()
Exemple #2
0
 def __init__(self, controler):
     Model.__init__(self, controler.window, controler.REFRESH_DOMAIN)
     self.controler = controler
     self.compatibility = self.window.compatibility
     self.objects = Objects(controler, {})