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

Create Nornir Groups based on Device "Location", "Region" and "Site Group" #39

Open
teixemf opened this issue Jan 30, 2022 · 1 comment

Comments

@teixemf
Copy link
Contributor

teixemf commented Jan 30, 2022

NetBoxInventory2 automatically create groups for the following attributes of Netbox devices:
site
platform
device_role
device_type
manufacturer

I would like to propose the creation of groups based on device "Location", "Region" and "Site Group".

For example, a device that is part of location Floor02, NetBoxInventory2 would create a group with the name location __floor02 and add the device to the group.

In Netbox, these attributes can be nested "Location", "Region" and "Site Group". (i.e.: A device could be located in Floor02-->IDF01)
To tackle this nornir_netbox would create the group location__floor02 and the group location __floor02__idf01

@wvandeun
Copy link
Owner

What is the use-case you would want to tackle with these groups?

I'm not in favor of adding these attributes as groups.

For Region and Site Group, implementing these would require additional API calls, as this data is not available from the 1 API call we make at this stage. We would then have to do manual processing to get a proper mapping of which device belongs to which group.
This would be significant overhead on what we the plugin is currently doing.

For locations it is probably the same. A location is unique within a site, to name it we would need to invent a different naming scheme for the group name, as location__floor02 could exist on multiple sites. Also as you describe locations can be nested. But this data is not exposed through the dcim/devices api call. So we would need to add existing API calls and processing of data to reflect the situation in the plugin.

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

No branches or pull requests

2 participants