daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> from ydk.services import CRUDService
  2. >>> from ydk.providers import NetconfServiceProvider
  3. >>> from ydk.models.openconfig import bgp
  4.  
  5. >>> provider = NetconfServiceProvider(address='xrv', port=830, username="cisco", password="cisco", protocol="ssh")
  6.  
  7. >>> crud = CRUDService()
  8.  
  9. >>> bgp = bgp.Bgp()
  10. >>> bgp.global_.config.as_ = 65512
  11.  
  12. >>> crud.create(provider, bgp)
  13. >>>
  14.  
  15. RP/0/0/CPU0:xrv# show run | begin bgp  
  16. Wed Aug 24 19:27:22.111 UTC
  17. Building configuration...
  18. router bgp 65512
  19. !
  20.  
  21. >>> bgp.global_.config.router_id = '1.1.1.1'
  22. >>> crud.create(provider, bgp)
  23. >>>
  24.  
  25. >>> bgp.global_.config.as_ = -1
  26. >>>
  27. >>> crud.create(provider, bgp)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top