当前位置: 首页>>代码示例>>Python>>正文


Python SimpleType.__init__方法代码示例

本文整理汇总了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'))
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:10,代码来源:network_object_group.py

示例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
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:14,代码来源:bridge_group_interface.py

示例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
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:14,代码来源:vxlan_nve.py

示例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)))
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:17,代码来源:service_object_group.py

示例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
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:6,代码来源:interface_config.py

示例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"
     )
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:6,代码来源:ntp.py

示例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())
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:6,代码来源:network_object.py

示例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')
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:4,代码来源:dns.py

示例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')
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:4,代码来源:service_policy.py

示例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)
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:5,代码来源:timeouts.py


注:本文中的base.simpletype.SimpleType.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。