from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
from PLC.NodeGroups import NodeGroup, NodeGroups
class AdmGetNodeGroupNodes(Method):
status = "deprecated"
+ object_type = 'Node'
+
roles = ['admin', 'pi', 'user', 'tech']
accepts = [
- PasswordAuth(),
+ Auth(),
Mixed(NodeGroup.fields['nodegroup_id'],
NodeGroup.fields['name'])
]
raise PLCInvalidArgument, "No such node group"
# Get the info for the node group specified
- nodegroup = nodegroups.values()[0]
+ nodegroup = nodegroups[0]
# Return the list of node_ids
return nodegroup['node_ids']