-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Updated PR on Netmiko support for pip installed ntc-templates #1710
Conversation
Per conversation in #1520, the following is now the hierarchy for finding the `ntc-templates/templates` directory: 1. Find directory in `NET_TEXTFSM` Environment Variable 2. Check for pip installed `ntc-templates` location in this environment 3. ~/ntc-templates/templates If a valid directory is not found, that is even if one is referenced in the environment variable or found in the home directory, a ValueError will be raised. Added two dependencies into the `setup.py` file: 1. `ntc-templates` so that going forward it will be automatically installed with Netmiko 2. `importlib_resources` if Python is less than 3.7
I was accidentally passing the entire path to `index` twice into CliTable.
…miko into lykinsbd-brett-ntc-templates2
@lykinsbd Made some updates here mainly related to the I removed direct ntc-templates dependency. I probably won't be willing to do that until this issue outlined here is fixed: networktocode/ntc-templates#672 Basically, I don't want that other terminal.py dependency in Netmiko (as that is unmaintained code) and caused me quite a bit of pain in the past. Still some more review that I need to do. |
@ktbyers I totally get waiting on making the direct dependency until As for the What I put afterwards, while more complicated, was focused on making I've used it in the past at the top level of a module/library initiation so that other developers could simply do It may not make sense to either use it at all in Netmiko, but more specifically may not make sense to do in utilities.py. Like I said, it makes sense to make it simpler, but wanted to give some background information on why I put the complicated version in there to start with. |
@lykinsbd Okay, that makes sense. I would say for now we just leave it as the simpler solution and then we can see across time if there are other needs for it (in Netmko). |
Superceded by PR here: #1961 |
No description provided.