Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Building configuration...
  2. !! IOS XR Configuration 6.1.2
  3. !! Last configuration change at Mon Mar 27 16:00:32 2017 by cisco
  4. !
  5. hostname XRv1
  6. logging console debugging
  7. vrf VPN_A
  8. !
  9. vrf VPN_B
  10. !
  11. vrf VPN_C
  12. !
  13. vrf VPN_D
  14. !
  15. vrf VPN_E
  16. !
  17. vrf VPN_F
  18. !
  19.  
  20.  
  21. netconf = NetconfService()
  22. xrv1 = NetconfServiceProvider(address="192.168.1.128",
  23. port=830,
  24. username="cisco",
  25. password="cisco",
  26. protocol="ssh")
  27.  
  28. vrfs = Cisco_IOS_XR_infra_rsi_cfg.Vrfs()
  29. all_vrf_names = netconf.get_config(xrv1, Datastore.running, vrfs)
  30. for vrf in all_vrf_names.vrf:
  31. print(vrf.vrf_name)
  32.  
  33.  
  34.  
  35. (ydk0.5.4py2) fred@ubuntu:~$ python xr_vpn_test_2.py
  36. VPN_A
  37. VPN_B
  38. VPN_C
  39. VPN_D
  40. VPN_E
  41. VPN_F
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement