1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Auth import Auth
5 from PLC.NodeGroups import NodeGroup, NodeGroups
7 class GetNodeGroups(Method):
9 Returns an array of structs containing details about all node
10 groups. If nodegroup_id_or_name_list is specified, only the
11 specified node groups will be queried.
14 roles = ['admin', 'pi', 'user', 'tech']
18 [Mixed(NodeGroup.fields['nodegroup_id'],
19 NodeGroup.fields['name'])]
22 returns = [NodeGroup.fields]
24 def call(self, auth, nodegroup_id_or_name_list = None):
25 return NodeGroups(self.api, nodegroup_id_or_name_list).values()