• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python services.ExecutorService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUpClass

 def setUpClass(self):
     self.ncc = NetconfServiceProvider(
         address='127.0.0.1',
         username='admin',
         password='admin',
         protocol='ssh',
         port=12022)
     self.executor = ExecutorService()
开发者ID:ReignInChaos,项目名称:ydk-gen,代码行数:8,代码来源:test_sanity_rpc.py


示例2: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    all = xr_snmp_test_trap_act.All()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, all)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-900-ydk.py


示例3: urlparse

    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    roll_back_configuration_to = xr_cfgmgr_rollback_act.RollBackConfigurationTo()  # create object
    prepare_roll_back_configuration_to(roll_back_configuration_to)  # add RPC input

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, roll_back_configuration_to)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-cfgmgr-rollback-act-32-ydk.py


示例4: setUpClass

 def setUpClass(self):
     self.csp = CodecServiceProvider(type=EncodingFormat.XML)
     self.es = ExecutorService()
     self.cs = CodecService()
开发者ID:111pontes,项目名称:ydk-gen,代码行数:4,代码来源:test_sanity_executor_rpc.py


示例5: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    platform_hfr_bundle_downed_link = xr_snmp_test_trap_act.PlatformHfrBundleDownedLink()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, platform_hfr_bundle_downed_link)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-440-ydk.py


示例6: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    routing_bgp_established_remote_peer = xr_snmp_test_trap_act.RoutingBgpEstablishedRemotePeer()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, routing_bgp_established_remote_peer)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-500-ydk.py


示例7: urlparse

    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    interface_link_down = xr_snmp_test_trap_act.InterfaceLinkDown()  # create object
    prepare_interface_link_down(interface_link_down)  # add RPC input

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, interface_link_down)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-306-ydk.py


示例8: urlparse

    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    logmsg = xr_syslog_act.Logmsg()  # create object
    prepare_logmsg(logmsg)  # add RPC input

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, logmsg)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-syslog-act-24-ydk.py


示例9: urlparse

    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    routing_mpls_tunnel_down = xr_snmp_test_trap_act.RoutingMplsTunnelDown()  # create object
    prepare_routing_mpls_tunnel_down(routing_mpls_tunnel_down)  # add RPC input

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, routing_mpls_tunnel_down)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-552-ydk.py


示例10: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    infra_flash_device_inserted = xr_snmp_test_trap_act.InfraFlashDeviceInserted()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, infra_flash_device_inserted)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-211-ydk.py


示例11: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    infra_bridge_topology_change = xr_snmp_test_trap_act.InfraBridgeTopologyChange()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, infra_bridge_topology_change)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-216-ydk.py


示例12: urlparse

    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    get_schema = ietf_netconf_monitoring.GetSchema()  # create object
    prepare_get_schema(get_schema)  # add RPC input

    # execute RPC on NETCONF device
    print(executor.execute_rpc(provider, get_schema))

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-ietf-netconf-monitoring-20-ydk.py


示例13: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    infra_redundancy_progression = xr_snmp_test_trap_act.InfraRedundancyProgression()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, infra_redundancy_progression)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-213-ydk.py


示例14: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    platform_hfr_plane_state = xr_snmp_test_trap_act.PlatformHfrPlaneState()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, platform_hfr_plane_state)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-448-ydk.py


示例15: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    entity_fru_fan_tray_inserted = xr_snmp_test_trap_act.EntityFruFanTrayInserted()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, entity_fru_fan_tray_inserted)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-420-ydk.py


示例16: urlparse

    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    ping = xr_ping_act.Ping()  # create object
    prepare_ping(ping)  # add RPC input

    # execute RPC on NETCONF device
    ping.output = executor.execute_rpc(provider, ping)
    print(process_ping(ping))

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-ping-act-28-ydk.py


示例17: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    sonet_line_status = xr_snmp_test_trap_act.SonetLineStatus()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, sonet_line_status)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-312-ydk.py


示例18: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    entity_fru_power_status_change_failed = xr_snmp_test_trap_act.EntityFruPowerStatusChangeFailed()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, entity_fru_power_status_change_failed)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-404-ydk.py


示例19: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    routing_ospf_neighbor_state_change = xr_snmp_test_trap_act.RoutingOspfNeighborStateChange()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, routing_ospf_neighbor_state_change)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-510-ydk.py


示例20: device

                        help="NETCONF device (ssh://user:[email protected]:port)")
    args = parser.parse_args()
    device = urlparse(args.device)

    # log debug messages if verbose argument specified
    if args.verbose:
        logger = logging.getLogger("ydk")
        logger.setLevel(logging.INFO)
        handler = logging.StreamHandler()
        formatter = logging.Formatter(("%(asctime)s - %(name)s - "
                                      "%(levelname)s - %(message)s"))
        handler.setFormatter(formatter)
        logger.addHandler(handler)

    # create NETCONF provider
    provider = NetconfServiceProvider(address=device.hostname,
                                      port=device.port,
                                      username=device.username,
                                      password=device.password,
                                      protocol=device.scheme)
    # create executor service
    executor = ExecutorService()

    infra_config_event = xr_snmp_test_trap_act.InfraConfigEvent()  # create object

    # execute RPC on NETCONF device
    executor.execute_rpc(provider, infra_config_event)

    exit()
# End of script
开发者ID:111pontes,项目名称:ydk-py-samples,代码行数:30,代码来源:nc-execute-xr-snmp-test-trap-act-217-ydk.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python year.is_leap_year函数代码示例发布时间:2022-05-27
下一篇:
Python services.CodecService类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap