My code below is to enter a configuration on the device or check if the device has a configuration.
driver = get_network_driver("ios")
device = driver(hostname= X.X.X.X,
username='username',
password='password',
optional_args={'port': 22})
device.open()
print("Accesing device")
device.load_merge_candidate(filename="syslog.txt")
diffs = device.compare_config()
if len(diffs) > 0:
print(diffs)
device.commit_config()
else:
print("no changes required")
device.discard_config()
device.close()
I was able to make this code for a single IP. Which Threading method would you recommend I use for multiple processes with NAPALM?
I made a few edits to your code. You can run the below code.