Uploading chapter 14 files

This commit is contained in:
muassif
2021-08-11 17:27:39 +04:00
committed by GitHub
parent b5a44b66fd
commit 80c742c923
21 changed files with 428 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from napalm import get_network_driver
import json
def main():
driver = get_network_driver('iosxr')
device = driver('172.16.2.50', 'root', 'rootroot')
try:
device.open()
print(json.dumps(device.get_interfaces_ip(), indent=2))
print(json.dumps(device.get_facts(), indent=2))
finally:
device.close()
if __name__ == '__main__':
main()