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.
pull/55982/head
Kris Amundson 6 years ago committed by Nilashish Chakraborty
parent c11af3dbef
commit f9dfb78d3c

@ -222,7 +222,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
def extract_platform(self, host): def extract_platform(self, host):
try: try:
return self.platforms_lookup[host["platform"]["id"]] return [self.platforms_lookup[host["platform"]["id"]]]
except Exception: except Exception:
return return
@ -345,6 +345,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
self.refresh_tenants_lookup, self.refresh_tenants_lookup,
self.refresh_racks_lookup, self.refresh_racks_lookup,
self.refresh_device_roles_lookup, self.refresh_device_roles_lookup,
self.refresh_platforms_lookup,
self.refresh_device_types_lookup, self.refresh_device_types_lookup,
self.refresh_manufacturers_lookup, self.refresh_manufacturers_lookup,
) )

Loading…
Cancel
Save