def get_acl_groups(**filter_data):
 acl_groups = models.AclGroup.list_objects(filter_data)
 for acl_group in acl_groups:
  acl_group_obj = models.AclGroup.objects.get(id=acl_group['id'])
  acl_group['users'] = [user.login for user in acl_group_obj.users.all()]
  acl_group['hosts'] = [host.hostname for host in acl_group_obj.hosts.all()]
 return rpc_utils.prepare_for_serialization(acl_groups)

def get_acl_groups ( ** filter_data ) : acl_groups = models . AclGroup . list_objects ( filter_data ) for acl_group in acl_groups : acl_group_obj = models . AclGroup . objects . get ( id = acl_group [ 'id' ] ) acl_group [ 'users' ] = [ user . login for user in acl_group_obj . users . all ( ) ] acl_group [ 'hosts' ] = [ host . hostname for host in acl_group_obj . hosts . all ( ) ] return rpc_utils . prepare_for_serialization ( acl_groups )
get acl groups .