2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Filter import Filter
6 from PLC.Auth import Auth
7 from PLC.NodeGroups import NodeGroup, NodeGroups
9 class GetNodeGroups(Method):
11 Returns an array of structs containing details about node groups.
12 If nodegroup_filter is specified and is an array of node group
13 identifiers or names, or a struct of node group attributes, only
14 node groups matching the filter will be returned. If return_fields
15 is specified, only the specified details will be returned.
18 roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
22 Mixed([Mixed(NodeGroup.fields['nodegroup_id'],
23 NodeGroup.fields['groupname'])],
24 Filter(NodeGroup.fields)),
25 Parameter([str], "List of fields to return", nullok = True)
28 returns = [NodeGroup.fields]
30 def call(self, auth, nodegroup_filter = None, return_fields = None):
31 return NodeGroups(self.api, nodegroup_filter, return_fields)