當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。