def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         asa_gen_template="failover link %(interface_name)s %(interface)s",
         response_parser=failover_response_parser,
     )
Example #2
0
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         is_removable=True,
         asa_gen_template='logging host %(interface)s %(ip)s',
         response_parser=cli_interaction.ignore_warning_response_parser)
 def __init__(self, name, asa_key = "flow-export destination"):
     '''Constructor'''
     
     self.interface = None
     SimpleType.__init__(self, name, asa_key,
         asa_gen_template = 'flow-export destination %(interface)s %(host)s %(port)s',
         response_parser = TemplateAndCollectors.ignore_msg_response_parser)
Example #4
0
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         asa_gen_template=
         'failover lan interface %(interface_name)s %(interface)s',
         response_parser=failover_response_parser)
    def __init__(self, ifc_key='ScanningThreatRate', asa_key = ScanningThreatDetection.THREAT_DETECTION_SCANNING_RATE):
        '''Constructor'''
        self.extra_cli = None

        SimpleType.__init__(self, ifc_key = ifc_key, asa_key = asa_key,
            asa_gen_template = ScanningThreatDetection.THREAT_DETECTION_SCANNING_RATE + ' rate-interval %(rate_interval)s average-rate %(average_rate)s burst-rate %(burst_rate)s',
            response_parser = ScanningThreatDetection.ignore_msg_response_parser)
Example #6
0
    def __init__(self, name, asa_key):
        '''Constructor'''

        SimpleType.__init__(
            self,
            name,
            asa_key,
            response_parser=TemplateAndCollectors.ignore_msg_response_parser)
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         is_removable=True,
         asa_gen_template="failover interface ip %(interface_name)s %(active_ip)s",
         response_parser=failover_response_parser,
     )
 def __init__(self, name):
     '''@todo: use Route.__init__ instead of SimpleType.__init__
        Route.__init__(self, name, defaults=None, asa_gen_template = 'ipv6 route %(interface)s %(prefix)s %(gateway)s')
     '''
     SimpleType.__init__(self, name,
                         asa_gen_template = 'ipv6 route %(interface)s %(prefix)s %(gateway)s %(hop_count)s %(tunneled)s',
                         defaults = {'hop_count': '', 'tunneled': ''},
                         response_parser = static_route_response_parser)
    def __init__(self):
        '''
        Constructor
        '''

        SimpleType.__init__(self, ifc_key = 'IPSSettings', asa_key = 'ips',
                            asa_gen_template='ips %(operate_mode)s %(fail_mode)s',
                            response_parser = cli_interaction.ignore_warning_response_parser)
Example #10
0
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         is_removable=True,
         asa_gen_template=
         'failover interface ip %(interface_name)s %(active_ip)s',
         response_parser=failover_response_parser)
Example #11
0
 def __init__(self, ifc_key, asa_key, on_value, response_parser):
     '''
     @param on_value: str
         The value in the dictionary to turn on the feature, e.g. 'enable'
     '''
     SimpleType.__init__(self, ifc_key, asa_key)
     self.on_value = on_value
     self.response_parser = response_parser
Example #12
0
    def __init__(self, ifc_key='BasicThreatDetectionRateAclDrop', asa_key='threat-detection rate acl-drop'):
        '''Constructor '''

        self.rate_type = None
        self.extra_cli = None
        SimpleType.__init__(self, ifc_key, asa_key,
            asa_gen_template = 'threat-detection rate %(rate)s rate-interval %(rate_interval)s average-rate %(average_rate)s burst-rate %(burst_rate)s',
            response_parser = cli_interaction.ignore_warning_response_parser)
Example #13
0
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         asa_gen_template=
         'route %(interface)s %(network)s %(netmask)s %(gateway)s %(metric)s',
         response_parser=static_route_response_parser,
         defaults={'metric': '1'})
Example #14
0
 def __init__(self, instance):
     SimpleType.__init__(
         self,
         ifc_key=instance,
         asa_key='access-group',
         asa_gen_template=
         'access-group %(access_list_name)s %(direction)s interface %(interface_name)s'
     )
Example #15
0
    def __init__(self, name, asa_key):
        '''Constructor'''

        SimpleType.__init__(
            self,
            name,
            asa_key,
            response_parser=ScanningThreatDetection.ignore_msg_response_parser)
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         is_removable=True,
         asa_gen_template="ip address %(active_ip)s %(netmask)s standby %(standby_ip)s",
         asa_mode_template="interface %(interface)s",
         response_parser=failover_response_parser,
     )
Example #17
0
 def __init__(self, name):
     SimpleType.__init__(
         self,
         name,
         is_removable=True,
         asa_gen_template=
         "ip address %(active_ip)s %(netmask)s standby %(standby_ip)s",
         asa_mode_template="interface %(interface)s",
         response_parser=failover_response_parser)
Example #18
0
 def __init__(self):
     '''
     Constructor
     '''
     SimpleType.__init__(
         self,
         'timeout_idle',
         'set connection timeout idle',
         asa_gen_template='set connection timeout idle %(idle_time)s',
         defaults={'idle_time': IDLE_TIME_DEFAULT})
Example #19
0
    def __init__(self, name, asa_key):
        '''Constructor'''

        SimpleType.__init__(
            self,
            name,
            asa_key,
            asa_gen_template=ScanningThreatDetection.
            THREAT_DETECTION_SCANNING_SHUN + ' duration %(duration)s',
            response_parser=ScanningThreatDetection.ignore_msg_response_parser)
Example #20
0
    def __init__(self):
        '''
        Constructor
        '''

        SimpleType.__init__(
            self,
            ifc_key='IPSSettings',
            asa_key='ips',
            asa_gen_template='ips %(operate_mode)s %(fail_mode)s',
            response_parser=cli_interaction.ignore_warning_response_parser)
Example #21
0
    def __init__(self, name, asa_key="flow-export destination"):
        '''Constructor'''

        self.interface = None
        SimpleType.__init__(
            self,
            name,
            asa_key,
            asa_gen_template=
            'flow-export destination %(interface)s %(host)s %(port)s',
            response_parser=TemplateAndCollectors.ignore_msg_response_parser)
Example #22
0
    def __init__(
            self,
            ifc_key="ShunExceptIP",
            asa_key="threat-detection scanning-threat shun except ip-address"):
        '''Constructor'''

        asa_gen_template = asa_key + " %(except_ip)s %(except_mask)s"
        SimpleType.__init__(
            self,
            ifc_key=ifc_key,
            asa_key=asa_key,
            asa_gen_template=asa_gen_template,
            response_parser=ScanningThreatDetection.ignore_msg_response_parser)
 def __init__(self, ifc_key='ExportAllEvent', asa_key='flow-export event-type all'):
     self.action = None
     self.destination = None
     self.config = None
     self.status = 'enable'
     template = None
     if ifc_key == 'ExportAllEvent':
         template = self.FLOW_EXPORT_ALL_EVENT_DESTINATION + ' %(event_destination)s'
     elif ifc_key == 'ExportCreationlEvent':
         template = self.FLOW_EXPORT_CREATION_EVENT_DESTINATION + ' %(event_destination)s'
     elif ifc_key == 'ExportDenyEvent':
         template = self.FLOW_EXPORT_DENY_EVENT_DESTINATION + ' %(event_destination)s'
     
     SimpleType.__init__(self, ifc_key, asa_key, asa_gen_template = template, response_parser = TemplateAndCollectors.ignore_msg_response_parser)
Example #24
0
 def __init__(self):
     '''
     Constructor
     '''
     SimpleType.__init__(
         self,
         'timeout_dcd',
         'set connection timeout dcd',
         asa_gen_template=
         'set connection timeout dcd %(retry_interval)s %(max_retries)s',
         defaults={
             'retry_interval': RETRY_INTERVAL_DEFAULT,
             'max_retries': MAX_RETRIES_DEFAULT
         })
Example #25
0
    def __init__(
            self,
            ifc_key="ShunExceptObject",
            asa_key="threat-detection scanning-threat shun except object-group"
    ):
        '''Constructor'''

        asa_gen_template = asa_key + " %(except_object_group)s"
        SimpleType.__init__(
            self,
            ifc_key=ifc_key,
            asa_key=asa_key,
            asa_gen_template=asa_gen_template,
            response_parser=ScanningThreatDetection.ignore_msg_response_parser)
Example #26
0
 def __init__(self, name):
     '''@todo: use Route.__init__ instead of SimpleType.__init__
        Route.__init__(self, name, defaults=None, asa_gen_template = 'ipv6 route %(interface)s %(prefix)s %(gateway)s')
     '''
     SimpleType.__init__(
         self,
         name,
         asa_gen_template=
         'ipv6 route %(interface)s %(prefix)s %(gateway)s %(hop_count)s %(tunneled)s',
         defaults={
             'hop_count': '',
             'tunneled': ''
         },
         response_parser=static_route_response_parser)
Example #27
0
    def __init__(
            self,
            ifc_key='ScanningThreatRate',
            asa_key=ScanningThreatDetection.THREAT_DETECTION_SCANNING_RATE):
        '''Constructor'''
        self.extra_cli = None

        SimpleType.__init__(
            self,
            ifc_key=ifc_key,
            asa_key=asa_key,
            asa_gen_template=ScanningThreatDetection.
            THREAT_DETECTION_SCANNING_RATE +
            ' rate-interval %(rate_interval)s average-rate %(average_rate)s burst-rate %(burst_rate)s',
            response_parser=ScanningThreatDetection.ignore_msg_response_parser)
Example #28
0
    def __init__(self,
                 ifc_key='ExportAllEvent',
                 asa_key='flow-export event-type all'):
        self.action = None
        self.destination = None
        self.config = None
        self.status = 'enable'
        template = None
        if ifc_key == 'ExportAllEvent':
            template = self.FLOW_EXPORT_ALL_EVENT_DESTINATION + ' %(event_destination)s'
        elif ifc_key == 'ExportCreationlEvent':
            template = self.FLOW_EXPORT_CREATION_EVENT_DESTINATION + ' %(event_destination)s'
        elif ifc_key == 'ExportDenyEvent':
            template = self.FLOW_EXPORT_DENY_EVENT_DESTINATION + ' %(event_destination)s'

        SimpleType.__init__(
            self,
            ifc_key,
            asa_key,
            asa_gen_template=template,
            response_parser=TemplateAndCollectors.ignore_msg_response_parser)
Example #29
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'priority',
                         asa_key = 'priority',
                         asa_mode_template = 'cluster group %(group_name)s',
                         asa_gen_template = 'priority %(priority)s')
Example #30
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key='clacp',
                         asa_key = 'clacp system-mac',
                         asa_gen_template='clacp system-mac %(system_mac)s')
    def __init__(self, ifc_key="ShunExceptObject", asa_key="threat-detection scanning-threat shun except object-group"):
        '''Constructor'''

        asa_gen_template = asa_key + " %(except_object_group)s"
        SimpleType.__init__(self, ifc_key = ifc_key, asa_key = asa_key, asa_gen_template = asa_gen_template,
            response_parser = ScanningThreatDetection.ignore_msg_response_parser)
Example #32
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'mtu',
                         asa_key = 'mtu cluster',
                         asa_gen_template='mtu cluster %(mtu)s',
                         response_parser = cluster_response_parser)
Example #33
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'cluster_interface',
                         asa_key = 'cluster-interface',
                         asa_gen_template='cluster-interface %(interface)s ip %(ip)s %(mask)s',
                         is_removable = False,
                         response_parser = cluster_response_parser)
 def __init__(self, ifc_key, asa_key, default):
     '''
     Constructor
     '''
     SimpleType.__init__(self, ifc_key, asa_key, defaults=default)
Example #35
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'conn_rebalance',
                         asa_key = 'conn-rebalance',
                         asa_mode_template = 'cluster group %(group_name)s',
                         asa_gen_template = 'conn-rebalance frequency %(conn_rebalance)s')
 def __init__(self):
     '''
     Constructor
     '''
     SimpleType.__init__(self, 'timeout_dcd', 'set connection timeout dcd', asa_gen_template='set connection timeout dcd %(retry_interval)s %(max_retries)s', defaults={'retry_interval': RETRY_INTERVAL_DEFAULT, 'max_retries': MAX_RETRIES_DEFAULT})
Example #37
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'health_check',
                         asa_key = 'health-check',
                         asa_mode_template = 'cluster group %(group_name)s',
                         asa_gen_template = 'health-check holdtime %(health_check)s')
 def __init__(self):
     SimpleType.__init__(
         self,
         ifc_key=AccessGroupGlobal.__name__,
         asa_key='access-group',
         asa_gen_template='access-group %(access_list_name)s global')
 def __init__(self, name):
     SimpleType.__init__(self, name, asa_gen_template="failover polltime", response_parser=failover_response_parser)
 def __init__(self, instance):
     SimpleType.__init__(
         self,
         ifc_key=instance,
         asa_key='access-group',
         asa_gen_template='access-group %(access_list_name)s %(direction)s interface %(interface_name)s')
    def __init__(self, name, asa_key):
        '''Constructor'''

        SimpleType.__init__(self, name, asa_key,
            response_parser = ScanningThreatDetection.ignore_msg_response_parser)
 def __init__(self, name):
     SimpleType.__init__(self, name,
                         asa_gen_template = 'route %(interface)s %(network)s %(netmask)s %(gateway)s %(metric)s',
                         response_parser = static_route_response_parser,
                         defaults={'metric': '1'})
Example #43
0
 def __init__(self):
     SimpleType.__init__(self, ifc_key = 'local_unit',
                         asa_key = 'local-unit',
                         asa_mode_template = 'cluster group %(group_name)s',
                         asa_gen_template = 'local-unit %(local_unit)s')
    def __init__(self, ifc_key="ShunExceptIP", asa_key="threat-detection scanning-threat shun except ip-address"):
        '''Constructor'''

        asa_gen_template = asa_key + " %(except_ip)s %(except_mask)s"
        SimpleType.__init__(self, ifc_key = ifc_key, asa_key = asa_key, asa_gen_template = asa_gen_template,
            response_parser = ScanningThreatDetection.ignore_msg_response_parser)
Example #45
0
 def __init__(self):
     SimpleType.__init__(
         self,
         ifc_key=AccessGroupGlobal.__name__,
         asa_key='access-group',
         asa_gen_template='access-group %(access_list_name)s global')
 def __init__(self, name, asa_key):
     '''Constructor'''
     self.stat_type = name[len('AdvancedThreatDetection'):].lower()
     self.folder_name = name
     SimpleType.__init__(self, name, asa_key,
         response_parser = cli_interaction.ignore_warning_response_parser)
 def __init__(self):
     '''
     Constructor
     '''
     SimpleType.__init__(self, 'timeout_idle', 'set connection timeout idle', asa_gen_template='set connection timeout idle %(idle_time)s', defaults={'idle_time': IDLE_TIME_DEFAULT})
Example #48
0
 def __init__(self):
     SimpleType.__init__(
         self,
         ifc_key='trap_level',
         asa_key='logging trap',
         response_parser=cli_interaction.ignore_warning_response_parser)
Example #49
0
 def __init__(self, name):
     SimpleType.__init__(self,
                         name,
                         asa_gen_template='failover polltime',
                         response_parser=failover_response_parser)
 def __init__(self, name, asa_key):
     '''Constructor '''
     SimpleType.__init__(self, name, asa_key,
         response_parser = cli_interaction.ignore_warning_response_parser)
Example #51
0
 def __init__(self, ifc_key, asa_key, default):
     '''
     Constructor
     '''
     SimpleType.__init__(self, ifc_key, asa_key, defaults=default)
    def __init__(self, name, asa_key):
        '''Constructor'''

        SimpleType.__init__(self, name, asa_key,
            asa_gen_template = ScanningThreatDetection.THREAT_DETECTION_SCANNING_SHUN + ' duration %(duration)s',
            response_parser = ScanningThreatDetection.ignore_msg_response_parser)