Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force the enable call to allow many cisco ios platforms to work #144

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

jeffkala
Copy link
Contributor

@jeffkala jeffkala commented Mar 9, 2024

fixes #64 , forcing the enable call to true fixes multiple cisco_ios switches.

Copy link
Contributor

@jvanderaa jvanderaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this thru a setting instead of defaulting to true? This could cause some challenges.

@itdependsnetworks
Copy link
Contributor

nornir-netmiko calls the enable method
https://github.com/ktbyers/nornir_netmiko/blob/develop/nornir_netmiko/tasks/netmiko_send_command.py#L27-L28

netmiko checks if it is enabled already
https://github.com/ktbyers/netmiko/blob/1c75ca31a13e2ab1844078a8e1b1fd5f77c51097/netmiko/base_connection.py#L2024-L2025

Would be good to ensure you have tested

  • No enable required
  • Enable required, Enable successful
  • Enable required, no enable password provided

@jvanderaa
Copy link
Contributor

I'm more so thinking through places that may provide the commands natively to the account that logs in, and disallows/alerts on someone issuing the command enable. So I would like to give them a method to disable the enable there. I'm generally OK if we have the default as True, but just want to provide a setting to disable this if nesseary.

@jvanderaa
Copy link
Contributor

So something like is_truthy(os.getenv("NAUTOBOT_ENABLE_DEFAULT", True))

@jeffkala
Copy link
Contributor Author

I'm open to whatever on this, I find we're getting setting bloat.

@jeffkala
Copy link
Contributor Author

@jvanderaa added your suggestion.
@itdependsnetworks tested all the ones you asked for

  • No enable required
  • Enable required, Enable successful
  • Enable required, no enable password provided

Plus a few other tests and everything seems to be working as we'd expect.

@jvanderaa jvanderaa merged commit 97f60df into nautobot:develop Mar 29, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Netmiko nornir send_command needs enable=
3 participants