You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add sites groups as children in their respective region groups
Add 1 value to choose the length of the group name prefix (before the '_') and 1 to "minify" the suffix part (using slugs (or lowercase and change special chars (space, -) to underscore))
Add interfaces per host and vlans per site
ISSUE TYPE
Feature Idea
COMPONENT NAME
Netbox inventory plugin
ADDITIONAL INFORMATION
Grouping by regions add sites as children of the group but currently add hosts too.
Interfaces and vlan gathering works, maybe not perfectly optimized?
Inventory: Fetch VLANs, and attach to interfaces VLANs #205 - VLANs. If simply all site VLANs were attached to every host the inventory file would be huge and potentially impact performance. (The JSON output of ansible-inventory --list is already 20MB for our NetBox database!).
I propose doing it slightly differently - download all VLANs, but only include the additional information on interfaces that have the VLAN on them. This will also duplicate a lot of information (hundred of ports with the same VLAN), but might be less than the alternative.
slug prefix length - I personally haven't had a use for this so haven't worked on it (I don't mind long strings). Not sure what others think?
From @Yannis100 on Aug 06, 2019 08:26
SUMMARY
Add sites groups as children in their respective region groups
Add 1 value to choose the length of the group name prefix (before the '_') and 1 to "minify" the suffix part (using slugs (or lowercase and change special chars (space, -) to underscore))
Add interfaces per host and vlans per site
ISSUE TYPE
COMPONENT NAME
Netbox inventory plugin
ADDITIONAL INFORMATION
Grouping by regions add sites as children of the group but currently add hosts too.
Interfaces and vlan gathering works, maybe not perfectly optimized?
Similar to use_slugs in nornir netbox inventory plugin
https://github.com/nornir-automation/nornir/blob/develop/nornir/plugins/inventory/netbox.py
For interfaces gathering, the following is a good example :
https://github.com/openfibernet/ansible-netbox-inventory/blob/master/netbox.py
or #59725
If a site is not assigned to a region, the plugin may fail
Copied from original issue: ansible/ansible#60124
The text was updated successfully, but these errors were encountered: