Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from jnpr.junos import Device
- router = Device(host="host", user='username', port="22", password="pass")
- router.open()
- show_route_output = router.rpc.get_route_information(protocol="direct", table="inet.0")
- for route in show_route_output.findall('route-table/rt/rt-destination'):
- print "%s" % route.text
- router.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement