create groups
erjolb opened this issue · 4 comments
Is it possible to create groups for the devices based on their role? For example, the ansible netbox inventory plugin can do something like this:
groups:
spine: "'spine' in device_roles"
Not yet. Feature is currently being developed and should be read in a couple of weeks.
The code is ready. You can install from the support_simple_inventory_defaults_groups if you want to give it a test already.
This hasn't been properly tested yet, lacks documentation and tests...
https://github.com/wvandeun/nornir_netbox/tree/support_simple_inventory_defaults_groups
The groups seem to be created now, but the one based on the device role is missing.
'device_type__vqfx-10000': Group: device_type__vqfx-10000,
'device_type__vx': Group: device_type__vx,
'manufacturer__cumulus': Group: manufacturer__cumulus,
'manufacturer__juniper': Group: manufacturer__juniper,
'platform__cumulus': Group: platform__cumulus,
'platform__junos': Group: platform__junos,
'site__gns3': Group: site__gns3}
Should be fixed in last release.
I'm going to open a PR and tag it as WIP. We can continue further discussion there.