0

I am attempting to use napalm to push configs to Cisco devices. When I do a compare_config, it is only showing me the additions, not the config which is being removed. From the examples I have seen, this should be included. Am I doing something wrong?

Here is my config:

from napalm import get_network_driver
driver = get_network_driver('ios')
device = driver('hostname', 'username', 'password')
device.open()
print(device.get_config()['running'])
device.load_merge_candidate(config='hostname test\n end\n')
print(device.compare_config())

I get this output:

>>> print(device.compare_config())
+hostname test

The output I am expecting is this:

>>> print(device.compare_config())
+hostname test
-hostname oldhostname

Why is it not showing the removed config?

Jonathan E
  • 54
  • 2
  • 12

0 Answers0