- re-enable return_fields specification
[plcapi.git] / PLC / Methods / GetNodeGroups.py
index c41b8b9..478eb99 100644 (file)
@@ -10,7 +10,8 @@ class GetNodeGroups(Method):
     Returns an array of structs containing details about node groups.
     If nodegroup_filter is specified and is an array of node group
     identifiers or names, or a struct of node group attributes, only
-    node groups matching the filter will be returned.
+    node groups matching the filter will be returned. If return_fields
+    is specified, only the specified details will be returned.
     """
 
     roles = ['admin', 'pi', 'user', 'tech']
@@ -19,10 +20,11 @@ class GetNodeGroups(Method):
         Auth(),
         Mixed([Mixed(NodeGroup.fields['nodegroup_id'],
                      NodeGroup.fields['name'])],
-              Filter(NodeGroup.fields))
+              Filter(NodeGroup.fields)),
+        Parameter([str], "List of fields to return", nullok = True)
         ]
 
     returns = [NodeGroup.fields]
   
-    def call(self, auth, nodegroup_filter = None):
-       return NodeGroups(self.api, nodegroup_filter).values()
+    def call(self, auth, nodegroup_filter = None, return_fields = None):
+       return NodeGroups(self.api, nodegroup_filter, return_fields)