Added variable data field and resource on inventory. Updated inventory script to output inventory variables for the 'all' group.

This commit is contained in:
Chris Church
2013-06-14 20:09:55 -04:00
parent d47ea40d60
commit abd81b7492
10 changed files with 326 additions and 13 deletions

View File

@@ -847,6 +847,13 @@ class InventoryRootGroupsList(BaseSubList):
all_ids = base.values_list('id', flat=True)
return base.exclude(parents__pk__in = all_ids)
class InventoryVariableDetail(BaseDetail):
model = Inventory
serializer_class = InventoryVariableDataSerializer
permission_classes = (CustomRbac,)
is_variable_data = True # Special flag for RBAC
class HostsVariableDetail(BaseDetail):
model = Host