X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAdmGetNodeGroupNodes.py;h=857e1b5d8a3265285264616594a2aeb9e3be0e46;hb=2b8aadbf673abb2cd3ac27ef0d2e3037f6f0779b;hp=a82ed566cf28c7a52306aa2859113a633eaa6e78;hpb=9495234109f25369b48cb284c1a8858772ef32a8;p=plcapi.git diff --git a/PLC/Methods/AdmGetNodeGroupNodes.py b/PLC/Methods/AdmGetNodeGroupNodes.py index a82ed56..857e1b5 100644 --- a/PLC/Methods/AdmGetNodeGroupNodes.py +++ b/PLC/Methods/AdmGetNodeGroupNodes.py @@ -1,23 +1,29 @@ 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): """ + Deprecated. See GetNodeGroups. + Returns a list of node_ids for the node group specified. """ + status = "deprecated" + + object_type = 'Node' + roles = ['admin', 'pi', 'user', 'tech'] accepts = [ - PasswordAuth(), + Auth(), Mixed(NodeGroup.fields['nodegroup_id'], NodeGroup.fields['name']) ] - returns = NodeGroup.join_fields['node_ids'] + returns = NodeGroup.fields['node_ids'] def call(self, auth, nodegroup_id_or_name): # Get nodes in this nodegroup @@ -26,7 +32,7 @@ class AdmGetNodeGroupNodes(Method): 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']