Ejemplo n.º 1
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.pfsense_ipsec = PFSenseIpsecModule(module, self.pfsense)
     self.pfsense_ipsec_proposal = PFSenseIpsecProposalModule(
         module, self.pfsense)
     self.pfsense_ipsec_p2 = PFSenseIpsecP2Module(module, self.pfsense)
Ejemplo n.º 2
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.pfsense_aliases = PFSenseAliasModule(module, self.pfsense)
     self.pfsense_interfaces = PFSenseInterfaceModule(module, self.pfsense)
     self.pfsense_rules = PFSenseRuleModule(module, self.pfsense)
     self.pfsense_rule_separators = PFSenseRuleSeparatorModule(module, self.pfsense)
     self.pfsense_vlans = PFSenseVlanModule(module, self.pfsense)
Ejemplo n.º 3
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.system = self.pfsense.get_element('system')
     self.users = self.system.findall('user')
     self.groups = self.system.findall('group')
     self.diff = {}
     self.change_descr = ''
Ejemplo n.º 4
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.pfsense_aliases = PFSenseAliasModule(module, self.pfsense)
     self.pfsense_interfaces = PFSenseInterfaceModule(module, self.pfsense)
     self.pfsense_nat_outbounds = PFSenseNatOutboundModule(
         module, self.pfsense)
     self.pfsense_nat_port_forwards = PFSenseNatPortForwardModule(
         module, self.pfsense)
     self.pfsense_rules = PFSenseRuleModule(module, self.pfsense)
     self.pfsense_rule_separators = PFSenseRuleSeparatorModule(
         module, self.pfsense)
     self.pfsense_vlans = PFSenseVlanModule(module, self.pfsense)
Ejemplo n.º 5
0
    def __init__(self, module, pfsense=None):
        super(PFSenseIpsecP2Module, self).__init__(module, pfsense)
        self.name = "pfsensible.core.ipsec_p2"
        self.apply = True
        self.obj = dict()

        if pfsense is None:
            pfsense = PFSenseModule(module)
        self.module = module
        self.pfsense = pfsense
        self.root_elt = self.pfsense.ipsec

        self._phase1 = None
        self.before_elt = None
Ejemplo n.º 6
0
    def __init__(self, module, pfsense=None):
        if pfsense is None:
            pfsense = PFSenseModule(module)
        self.module = module  # ansible module
        self.name = None  # ansible module name
        self.params = None  # ansible input parameters

        self.pfsense = pfsense  # helper module
        self.apply = True  # apply configuration at the end

        self.obj = None  # dict holding target pfsense parameters
        self.target_elt = None  # xml object holding target pfsense parameters
        self.root_elt = None  # xml parent of target_elt

        self.change_descr = ''

        self.result = {}
        self.result['changed'] = False
        self.result['commands'] = []

        self.diff = {'after': {}, 'before': {}}
        self.result['diff'] = self.diff
Ejemplo n.º 7
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.system = self.pfsense.get_element('system')
     self.groups = self.system.findall('group')
Ejemplo n.º 8
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.certs = self.pfsense.get_elements('cert')
Ejemplo n.º 9
0
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.system = self.pfsense.get_element('system')
     self.authservers = self.system.findall('authserver')
     self.diff = {'after': {}, 'before': {}}
Ejemplo n.º 10
0
Archivo: ca.py Proyecto: wungad/core
 def __init__(self, module):
     self.module = module
     self.pfsense = PFSenseModule(module)
     self.cas = self.pfsense.get_elements('ca')
     self.crls = self.pfsense.get_elements('crl')