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

Give the ability to use Napalm driver as the platform rather than the actual platform name or slug #22

Closed
melkypie opened this issue Jan 6, 2021 · 4 comments · Fixed by #27
Labels
enhancement New feature or request

Comments

@melkypie
Copy link

melkypie commented Jan 6, 2021

Currently if you want to integrate with the nornir_napalm plugin which seems to look at platform in host, you cannot have a differently named name or slug than the actual Napalm driver.

Seems like this will require another request be made to the Netbox API as the Napalm driver info is not passed in the devices endpoint (correct me if I'm wrong).

@wvandeun
Copy link
Owner

wvandeun commented Jan 6, 2021

Hi,
What you are describing is indeed the intended behaviour, which is exactly the same behaviour as the Ansible NetBox inventory plugin (AFAIK).
Just out of curiosity, how are you defining the platform in NetBox?

Technically it is possible what you are describing. It would require an additional API call to retrieve all the platforms and then extract the napalm driver.

@melkypie
Copy link
Author

melkypie commented Jan 7, 2021

Currently platform has manufacturer with the system name, ex., Arista Eos.
If there could be an option that would just replace use_platform_slug with something like platform_field, that would have name, slug or driver options with name of course being the default, would be great.
I could probably manage to do this myself if no one finds the time.

@tyler-8
Copy link

tyler-8 commented Jan 19, 2021

One possibility I could see is retrieving the full list of platforms alongside the devices/VMs - that way you're only incurring a single (or several depending on platform count) additional API call, rather than one call for all devices.

@wvandeun wvandeun added the enhancement New feature or request label Jan 24, 2021
@NetIgo
Copy link

NetIgo commented Mar 6, 2021

i agree, + 1
I run into a similar situation this week.
I wanted to use a specific platform 'cisco_xe' for netmiko.
But as you can imagine if i update the platform name or slug with 'cisco_xe', i won't be able to use the nornir_napalm anymore.
This is why i think it's a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants