question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

save_config() got an unexpected keyword argument 'confirm_response'

See original GitHub issue

Hi,

I am running this code against a test device, where it logs into the device and attempts to save the configuration

from nornir import InitNornir
from nornir.plugins.tasks.networking import netmiko_save_config
from nornir.plugins.functions.text import print_result

def save_config(task):
    task.run(task=netmiko_save_config,
             name='Saving configuration',
             cmd='copy running-config startup-config')

result = target_hosts.run(save_config)
print_result(result, vars=["stdout"])

However Nornir throws an exception and I get below message “save_config() got an unexpected keyword argument ‘confirm_response’”.

What’s more strange is, despite the exception, device configuration is saved to startup-config file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ktbyerscommented, Mar 13, 2019

That is probably a bug in Netmiko. It should probably be fixed in Netmiko (i.e. all Netmiko drivers should accept the same set of arguments for that method).

0reactions
ktbyerscommented, Apr 25, 2019

This is fixed in the Netmiko develop branch. I am going to go ahead and close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

getting errors while running tests in test_netmiko_config.py in ...
E TypeError: save_config() got an unexpected keyword argument 'confirm_response'. test_netmiko_config.py:135: TypeError.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found