Open teixemf opened 2 years ago
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.
NetBoxInventory2 automatically create groups for the following attributes of Netbox devices: _site platform device_role devicetype 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 nornirnetbox would create the group location__floor02 and the group location floor02idf01_