-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add netmiko_ssh_autodetect task #30
base: master
Are you sure you want to change the base?
Conversation
@matman26 I will try to look at this in the next week to 10 days. Thanks for the contribution. |
@matman26 I started reviewing this. I apologize for the delay. I somewhat think we should not include this in the https://github.com/ktbyers/nornir_netmiko/blob/develop/nornir_netmiko/connections/netmiko.py And this is technically creating a connection. Also things like all of the additional Netmiko arguments are not supported. These are things that in Nornir are typical put into Connection Options > Netmiko > Extras. I think that this might be a case where it is just better to have an example of doing it, instead of actually creating an ongoing nornir_netmiko task for it. Let me know your thoughts on it. |
Hello, @ktbyers @matman26 , i think we can add a new plateform autodetect or ssh_autodetect to the existing dict in order to be able to handle ssh autodetect. We can handle it something like this example inside the open function As you suggested @ktbyers if we change it in netmiko connection it would work but i think that @matman26 suggestion is also a good idea .If we want to add some logic ( for example send different command based on which vendor we are using , etc..) it won't work because you don't know which plateform you are really using. Thanks ! |
@ncharaf What problem are you trying to solve? It is not clear to me what is the issue that we are trying to fix? |
Hello, @ktbyers The idea is to implement a new plateform (ssh_autodetect or something else) on netmiko connecter in order to detect the device_type and set it dynamically so we will be able to execute the command on device. We can also add a task that can detect the device_type and change it in the host platform in order to change the device plateform and have a faster execution because you don't need have to use the autodetect since we know already the plateform. Is it clear ? Thanks ! |
@ncharaf Yeah, I guess we could (possibly) do something like |
Made this little task that uses SSHDetect to guess the network OS for a bunch of devices in my network. Task works on a regular nornir inventory, returning a Result with the guessed device_type for each host in the result field (there is also a flag that allows hosts to be updated at runtime). Since this uses netmiko directly I guess it makes sense to submit it as part of this plugin.
Thanks!