Advertisement
Guest User

Untitled

a guest
Feb 16th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from jnpr.junos import Device
  2. router = Device(host="host", user='username', port="22", password="pass")
  3. router.open()
  4. show_route_output = router.rpc.get_route_information(protocol="direct", table="inet.0")
  5. for route in show_route_output.findall('route-table/rt/rt-destination'):
  6. print "%s" % route.text
  7. router.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement