mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-03 03:42:45 +00:00
Netbox Inventory: Group By Platforms (#52780)
Fixes the functionality to group_by 'platforms'. Adds the call to self.refresh_platforms_lookup back and fixes square brackets to return a list instead of a string.
This commit is contained in:
committed by
Nilashish Chakraborty
parent
c11af3dbef
commit
f9dfb78d3c
@@ -222,7 +222,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||
|
||||
def extract_platform(self, host):
|
||||
try:
|
||||
return self.platforms_lookup[host["platform"]["id"]]
|
||||
return [self.platforms_lookup[host["platform"]["id"]]]
|
||||
except Exception:
|
||||
return
|
||||
|
||||
@@ -345,6 +345,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||
self.refresh_tenants_lookup,
|
||||
self.refresh_racks_lookup,
|
||||
self.refresh_device_roles_lookup,
|
||||
self.refresh_platforms_lookup,
|
||||
self.refresh_device_types_lookup,
|
||||
self.refresh_manufacturers_lookup,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user