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