def __init__(self): ''' Constructor ''' DMObject.__init__(self, ifc_key='ConnectionSettings', asa_key='set connection') conn_ifc_asa_keys = [ # IFC Key ASA Key Default #connection limits ("conn_max", "set connection conn-max", '0'), ("conn_max_embryonic", "set connection embryonic-conn-max", '0'), ("per_client_max", "set connection per-client-max", '0'), ("per_client_max_embryonic", "set connection per-client-embryonic-max", '0'), ("random_seq_num", "set connection random-sequence-number", 'enable') ] conn_timeout_ifc_asa_keys = [ # IFC Key ASA Key Default #connection timeouts ("timeout_embryonic", "set connection timeout embryonic", '0:0:30' ), ("timeout_half_closed", "set connection timeout half-closed", '0:10:0') ] for (ifc, asa, dflt) in conn_ifc_asa_keys: self.register_child(ConnObj(ifc, asa, dflt)) for (ifc, asa, dflt) in conn_timeout_ifc_asa_keys: self.register_child(ConnTimeoutObj(ifc, asa, dflt)) self.register_child(ConnTimeoutIdle()) self.register_child(ConnTimeoutDcd())
def __init__(self, instance): DMObject.__init__(self, ifc_key=instance) self.defaults = { 'protocol': {'name_number': 'ip'}, 'source_address': {'any': 'any'}, 'destination_address': {'any': 'any'} }
def __init__(self): DMObject.__init__(self, FailoverConfig.__name__) ifc_asa_keys = ( ("lan_unit", "failover lan unit"), ("key_secret", "failover key"), ("key_in_hex", "failover key hex"), ("interface_policy", "failover interface-policy"), ) for ifc, asa in ifc_asa_keys: self.register_child(SimpleType(ifc, asa, response_parser=failover_response_parser)) self.register_child( DMBoolean( "http_replication", "failover replication http", on_value="enable", response_parser=failover_response_parser, ) ) self.register_child(DMList("mgmt_standby_ip", MgmtStandbyIP, asa_key="ip address")) self.register_child(DMList("failover_lan_interface", FailoverLANInterface, asa_key="failover lan interface")) self.register_child(DMList("failover_link_interface", FailoverLinkInterface, asa_key="failover link")) self.register_child(DMList("failover_ip", FailoverIP, asa_key="failover interface ip")) self.register_child(DMList("polltime", FailoverPolltime, asa_key="failover polltime")) self.response_parser = failover_response_parser self.register_child( DMBoolean( ifc_key="failover", asa_key="failover", on_value="enable", response_parser=failover_response_parser ) )
def __init__(self): ''' Constructor ''' DMObject.__init__(self, ifc_key = 'ConnectionSettings', asa_key = 'set connection') conn_ifc_asa_keys = [# IFC Key ASA Key Default #connection limits ("conn_max", "set connection conn-max", '0'), ("conn_max_embryonic", "set connection embryonic-conn-max", '0'), ("per_client_max", "set connection per-client-max", '0'), ("per_client_max_embryonic", "set connection per-client-embryonic-max", '0'), ("random_seq_num", "set connection random-sequence-number", 'enable') ] conn_timeout_ifc_asa_keys = [# IFC Key ASA Key Default #connection timeouts ("timeout_embryonic", "set connection timeout embryonic", '0:0:30'), ("timeout_half_closed", "set connection timeout half-closed", '0:10:0') ] for (ifc, asa, dflt) in conn_ifc_asa_keys: self.register_child(ConnObj(ifc, asa, dflt)) for (ifc, asa, dflt) in conn_timeout_ifc_asa_keys: self.register_child(ConnTimeoutObj(ifc, asa, dflt)) self.register_child(ConnTimeoutIdle()) self.register_child(ConnTimeoutDcd())
def __init__(self): DMObject.__init__(self, FailoverConfig.__name__) ifc_asa_keys = (("lan_unit", "failover lan unit"), ("key_secret", "failover key"), ("key_in_hex", "failover key hex"), ("interface_policy", "failover interface-policy")) for ifc, asa in ifc_asa_keys: self.register_child( SimpleType(ifc, asa, response_parser=failover_response_parser)) self.register_child( DMBoolean('http_replication', 'failover replication http', on_value="enable", response_parser=failover_response_parser)) self.register_child( DMList('mgmt_standby_ip', MgmtStandbyIP, asa_key='ip address')) self.register_child( DMList('failover_lan_interface', FailoverLANInterface, asa_key='failover lan interface')) self.register_child( DMList('failover_link_interface', FailoverLinkInterface, asa_key='failover link')) self.register_child( DMList('failover_ip', FailoverIP, asa_key='failover interface ip')) self.register_child( DMList('polltime', FailoverPolltime, asa_key='failover polltime')) self.response_parser = failover_response_parser self.register_child( DMBoolean(ifc_key="failover", asa_key="failover", on_value="enable", response_parser=failover_response_parser))
def populate_model(self, delta_ifc_key, delta_ifc_cfg_value): 'Override the default implementation because the IFC model does not directly map to self.children of DNSServer' DMObject.populate_model(self, delta_ifc_key, delta_ifc_cfg_value) 'Let DNSServer share the configuration with this translator' dns_server = self.children.values()[1] dns_server.populate_model(delta_ifc_key, delta_ifc_cfg_value)
def __init__(self): ''' Constructor ''' DMObject.__init__(self, ScanningThreatDetection.__name__) self.register_child( SimpleScanning('scanning_threat', self.THREAT_DETECTION_SCANNING)) self.register_child( SimpleShun('shun_status', self.THREAT_DETECTION_SCANNING_SHUN)) rate_translator = DMList('ScanningThreatRate', ScanningThreatRate, asa_key=self.THREAT_DETECTION_SCANNING_RATE) self.register_child(rate_translator) rate_translator = DMList('ScanningThreatShunExceptIP', ShunExceptIP, asa_key=self.THREAT_DETECTION_SCANNING_SHUN + " except ip-address") self.register_child(rate_translator) rate_translator = DMList('ScanningThreatShunExceptObject', ShunExceptObject, asa_key=self.THREAT_DETECTION_SCANNING_SHUN + " except object-group") self.register_child(rate_translator) self.register_child( ShunDuration('ScanningThreatShunDuration', self.THREAT_DETECTION_SCANNING_SHUN + " duration"))
def __init__(self): DMObject.__init__(self, NTP.__name__) self.register_child(DMList("NTPServer", NTPObj, asa_key="ntp server")) self.register_child(DMList(name="NTPTrustedKey", child_class=NTPTrustedKey, asa_key="ntp trusted-key")) self.register_child(DMBoolean(ifc_key="NTPAuthenticate", asa_key="ntp authenticate", on_value="enable")) self.register_child( DMList(name="NTPAuthenticationKey", child_class=NTPAuthenticationKey, asa_key="ntp authentication-key") )
def __init__(self): ''' Initialize ''' DMObject.__init__(self, ifc_key = 'NetFlowSettings', asa_key='flow-export') self.mode_command = None self.register_child(ExportEventType('ExportAllEvent', 'flow-export event-type all destination')) self.register_child(ExportEventType('ExportCreationEvent', 'flow-export event-type flow-create destination')) self.register_child(ExportEventType('ExportDenyEvent', 'flow-export event-type flow-denied destination')) self.myconfig = None
def __init__(self): ''' Constructor ''' DMObject.__init__(self, ifc_key = 'InspectionSettings', asa_key = 'inspect') self.mode_command = None for ifc, cli_prefix, is_default in InspectionSubCommands.ifc_asa_keys: self.register_child(DMBoolean(ifc, cli_prefix, on_value="enable"))
def __init__(self): ''' Constructor ''' DMObject.__init__(self, BasicThreatDetection.__name__) self.audit = False self.register_child(SimpleBasicThreat("basic_threat", 'threat-detection basic-threat', on_value="enable", response_parser=cli_interaction.ignore_warning_response_parser)) for rate_type in self.RATE_OPTIONS: self.register_child(BasicThreatRateList('BasicThreatDetectionRate' + self.to_camel_case(rate_type), BasicThreatRate, asa_key='threat-detection rate ' + rate_type, rate_type = rate_type))
def __init__(self): ''' Constructor ''' DMObject.__init__(self, ifc_key='InspectionSettings', asa_key='inspect') self.mode_command = None for ifc, cli_prefix, is_default in InspectionSubCommands.ifc_asa_keys: self.register_child(DMBoolean(ifc, cli_prefix, on_value="enable"))
def __init__(self, instance): DMObject.__init__(self, ifc_key=instance) self.defaults = { 'protocol': { 'name_number': 'ip' }, 'source_address': { 'any': 'any' }, 'destination_address': { 'any': 'any' } }
def __init__(self): ''' Constructor ''' self.interface = None DMObject.__init__(self, TemplateAndCollectors.__name__) self.response_parser = self.ignore_msg_response_parser self.register_child(DMList('NetFlowCollectors', NetFlowCollectors, asa_key='flow-export destination')) self.register_child(TemplateTimeout("template_timeout_rate", self.FLOW_EXPORT_TIMEOUT_RATE)) self.register_child(DelayFlowCreate("delay_flow_create", self.FLOW_EXPORT_DELAY_CREATE)) self.register_child(ActiveRefresh("active_refresh_interval", self.FLOW_EXPORT_REFRESH_RATE))
def __init__(self): ''' Initialize ''' DMObject.__init__(self, ifc_key='NetFlowSettings', asa_key='flow-export') self.mode_command = None self.register_child( ExportEventType('ExportAllEvent', 'flow-export event-type all destination')) self.register_child( ExportEventType('ExportCreationEvent', 'flow-export event-type flow-create destination')) self.register_child( ExportEventType('ExportDenyEvent', 'flow-export event-type flow-denied destination')) self.myconfig = None
def __init__(self): ''' Constructor ''' DMObject.__init__(self, ScanningThreatDetection.__name__) self.register_child(SimpleScanning('scanning_threat', self.THREAT_DETECTION_SCANNING)) self.register_child(SimpleShun('shun_status', self.THREAT_DETECTION_SCANNING_SHUN)) rate_translator = DMList('ScanningThreatRate', ScanningThreatRate, asa_key=self.THREAT_DETECTION_SCANNING_RATE) self.register_child(rate_translator) rate_translator = DMList('ScanningThreatShunExceptIP', ShunExceptIP, asa_key=self.THREAT_DETECTION_SCANNING_SHUN + " except ip-address") self.register_child(rate_translator) rate_translator = DMList('ScanningThreatShunExceptObject', ShunExceptObject, asa_key=self.THREAT_DETECTION_SCANNING_SHUN + " except object-group") self.register_child(rate_translator) self.register_child(ShunDuration('ScanningThreatShunDuration', self.THREAT_DETECTION_SCANNING_SHUN + " duration"))
def __init__(self): ''' Constructor ''' DMObject.__init__(self, AdvancedThreatDetection.__name__) self.has_device = False translator = SimpleAccessList("access_list", self.THREAT_DETECTION_STATISTICS_ACCESS_LIST, on_value="enable", response_parser=cli_interaction.ignore_warning_response_parser) self.register_child(translator) for opt in ['host', 'port', 'protocol']: translator = NumberOfRateOption('AdvancedThreatDetection' + opt.title(), self.THREAT_DETECTION_STATISTICS + ' ' + opt) self.register_child(translator) translator = TcpIntercept('AdvancedThreatDetectionTcpIntercept', self.THREAT_DETECTION_STATISTICS_TCP_INTERCEPT) self.register_child(translator) translator = SimpleStatistics("statistics", self.THREAT_DETECTION_STATISTICS, on_value="enable", response_parser=cli_interaction.ignore_warning_response_parser) self.register_child(translator)
def __init__(self): DMObject.__init__(self, LoggingConfig.__name__) ifc_asa_keys = (("facility", "logging facility"), ("buffered_level", "logging buffered"), ("buffer_size", "logging buffer-size"), ("flash_maximum_allocation", "logging flash-maximum-allocation"), ("flash_minimum_free", "logging flash-minimum-free")) for (ifc, asa) in ifc_asa_keys: self.register_child( SimpleType(ifc, asa, is_removable=True, response_parser=cli_interaction. ignore_warning_response_parser)) self.register_child(LoggingTrap()) ifc_asa_keys_boolean_type = (("enable_logging", "logging enable"), ("standby", "logging standby"), ("flash_bufferwrap", "logging flash-bufferwrap"), ("permit_hostdown", "logging permit-hostdown")) for (ifc, asa) in ifc_asa_keys_boolean_type: self.register_child( DMBoolean(ifc, asa, on_value="enable", response_parser=cli_interaction. ignore_warning_response_parser)) self.register_child( DMList('logging_host', LoggingHost, asa_key='logging host')) self.register_child( DMList('logging_message', LoggingMessage, asa_key='logging message')) self.response_parser = cli_interaction.ignore_warning_response_parser
def __init__(self): ''' Constructor ''' self.interface = None DMObject.__init__(self, TemplateAndCollectors.__name__) self.response_parser = self.ignore_msg_response_parser self.register_child( DMList('NetFlowCollectors', NetFlowCollectors, asa_key='flow-export destination')) self.register_child( TemplateTimeout("template_timeout_rate", self.FLOW_EXPORT_TIMEOUT_RATE)) self.register_child( DelayFlowCreate("delay_flow_create", self.FLOW_EXPORT_DELAY_CREATE)) self.register_child( ActiveRefresh("active_refresh_interval", self.FLOW_EXPORT_REFRESH_RATE))
def __init__(self): ''' Initialize ''' DMObject.__init__(self, 'NetFlowObjects') self.register_child(TemplateAndCollectors())
def __init__(self): DMObject.__init__(self, NATRuleDeployment.__name__) self.xlate_clis = []
def __init__(self): DMObject.__init__(self, AccessListDeployment.__name__) self.acl_changed = False
def __init__(self, instance): DMObject.__init__(self, ifc_key=instance)
def __init__(self): DMObject.__init__(self, 'ExtStaticRoute') self.register_child(RouteList("route", "external")) self.register_child(RouteList("ipv6 route", "external"))
def __init__(self): DMObject.__init__(self, ClusterConfig.__name__) self.register_child(ClusterRole()) self.register_child(DMList('pool_config', PoolConfig, asa_key='ip local pool')) self.register_child(BootstrapConfig()) self.register_child(ClusterMtu())
def __init__(self): DMObject.__init__(self, 'cluster_role')
def __init__(self): DMObject.__init__(self, SmartCallHome.__name__) self.register_child( DMBoolean(ifc_key='anonymous_reporting', asa_key=ANONYMOUS_REPORTING_CLI, on_value='enable'))
def __init__(self): DMObject.__init__(self, DNS.__name__) self.register_child(DNSDomainLookup()) self.register_child(DNSServer())