nautobot / nornir-nautobot

Nornir inventory and plugins for Nautobot.
https://docs.nautobot.com/projects/nornir-nautobot/en/latest/
31 stars 25 forks source link

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

Closed jeffkala closed 5 months ago

jeffkala commented 6 months ago

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

itdependsnetworks commented 6 months ago

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

jvanderaa commented 6 months ago

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 commented 6 months ago

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

jeffkala commented 6 months ago

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

jeffkala commented 5 months ago

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

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