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


Python simpletype.SimpleType类代码示例

本文整理汇总了Python中base.simpletype.SimpleType的典型用法代码示例。如果您正苦于以下问题:Python SimpleType类的具体用法?Python SimpleType怎么用?Python SimpleType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SimpleType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: generate_cli

 def generate_cli(self, asa_cfg_list, cli):
     """
     Override the default implementation to make the modify and delete CLI idempotent.
     That is issuing the CLI multiple times result in the same behavior in the running-config
     without the need to report error.
     """
     SimpleType.generate_cli(self, asa_cfg_list, cli, response_parser = idempotent_response_parser)
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:7,代码来源:service_object_group.py

示例2: __init__

 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,代码行数:8,代码来源:network_object_group.py

示例3: parse_multi_parameter_cli

 def parse_multi_parameter_cli(self, cli):
     '''Override the default implementation in case the CLI does not match asa_gen_template due to optional
     parameter
     '''
     result = SimpleType.parse_multi_parameter_cli(self, cli)
     if not result:
         result = SimpleType.parse_multi_parameter_cli(self, cli,
                                                       alternate_asa_gen_template = ' '.join(self.asa_gen_template.split()[:3]))
     return result
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:9,代码来源:service_object_group.py

示例4: ifc2asa

 def ifc2asa(self, no_asa_cfg_stack,  asa_cfg_list):
     '''Override the default implementation for modify action:
     Need to issue no command to delete old one and then issue command to set the new one.
     '''
     if self.get_action() == State.MODIFY:
         old_cli = self.get_old_cli()
         if old_cli:
             self.generate_cli(no_asa_cfg_stack, 'no ' + old_cli)
     SimpleType.ifc2asa(self, no_asa_cfg_stack, asa_cfg_list)
开发者ID:AlexFengCisco,项目名称:ACI_REST_Project,代码行数:9,代码来源:service_policy.py

示例5: __init__

 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,代码行数:12,代码来源:bridge_group_interface.py

示例6: __init__

 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,代码行数:12,代码来源:vxlan_nve.py


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