本文整理汇总了Python中base.simpletype.SimpleType.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleType.__init__方法的具体用法?Python SimpleType.__init__怎么用?Python SimpleType.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base.simpletype.SimpleType
的用法示例。
在下文中一共展示了SimpleType.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(self, name,
asa_gen_template='object-group network %(name)s');
self.register_child(Description())
self.register_child(DMList(name='host_ip_address', child_class = HostObject, asa_key = 'network-object host'))
self.register_child(DMList(name='object_name', child_class = ObjectObject, asa_key = 'network-object object'))
self.register_child(DMList(name='network_ip_address', child_class = NetworkObject, asa_key = 'network-object'))
self.register_child(DMList(name='object_group_name', child_class = GroupObject, asa_key = 'group-object'))
示例2: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(self, name,
asa_gen_template='interface BVI%(bvi_id)s');
self.register_child(IPv4Addr('ipv4_address'))
self.register_child(DMList(name='ipv6_address_with_prefix', child_class=IPv6Addr, asa_key ='ipv6 address'))
self.register_child(IPv6Enable('ipv6_enable'))
self.register_child(IPv6NDDad('ipv6_nd_dad_attempts'))
self.register_child(IPv6NDNsInterval('ipv6_nd_ns_interval'))
self.register_child(IPv6NDReachable('ipv6_nd_reachable_time'))
self.member1 = BridgeGroupMember()
self.member2 = BridgeGroupMember()
self.response_parser = cli_interaction.ignore_info_response_parser
示例3: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(self, name,
asa_gen_template='interface TVI1'); # Phase 1 only has TVI1
self.register_child(IPv4Addr('ipv4_address'))
self.register_child(DMList(name='ipv6_address_with_prefix', child_class=IPv6Addr, asa_key ='ipv6 address'))
self.register_child(IPv6Enable('ipv6_enable'))
self.register_child(IPv6NDDad('ipv6_nd_dad_attempts'))
self.register_child(IPv6NDNsInterval('ipv6_nd_ns_interval'))
self.register_child(IPv6NDReachable('ipv6_nd_reachable_time'))
self.register_child(MACAddr('mac-address'))
self.register_child(NameIF('nameif'))
self.response_parser = cli_interaction.ignore_info_response_parser
示例4: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, instance):
SimpleType.__init__(self, ifc_key = instance, asa_gen_template='object-group service %(name)s');
self.register_child(Description())
children = [# ifc_key child_class asa_key
('protocol_type', ProtocolObject, '^service-object \S+$'),
('object_name', ObjectObject, '^service-object object'),
('tcp', TCPObject, '^service-object tcp '),
('udp', UDPObject, '^service-object udp '),
('tcp-udp', TCPUDPObject, '^service-object tcp-udp'),
('icmp', ICMPObject, '^service-object icmp '),
('icmp6', ICMP6Object, '^service-object icmp6'),
('object_group_name', GroupObject, '^group-object'),
]
for ifc_key, child_class, asa_key in children:
self.register_child(DMList(ifc_key, child_class, re.compile(asa_key)))
示例5: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, ifc_key, asa_gen_template):
SimpleType.__init__(self, ifc_key = ifc_key, asa_gen_template = asa_gen_template)
self.cli_key = ''
self.response_parser = cli_interaction.ignore_info_response_parser
示例6: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(
self, name, is_removable=True, asa_gen_template="ntp authentication-key %(key_number)s md5 %(key)s"
)
示例7: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(self, name,
asa_gen_template='object network %(name)s');
self.register_child(Description())
示例8: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, name):
SimpleType.__init__(self, name, asa_gen_template='name-server %s')
示例9: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self):
SimpleType.__init__(self, ifc_key='TrafficSelection', asa_key='match', defaults='any')
示例10: __init__
# 需要导入模块: from base.simpletype import SimpleType [as 别名]
# 或者: from base.simpletype.SimpleType import __init__ [as 别名]
def __init__(self, ifc_key, asa_key, default, min, max, allow0=False):
SimpleType.__init__(self, ifc_key=ifc_key, asa_key=asa_key, defaults=default)
TimeValidator.__init__(self, min=min, max=max, allow0=allow0)