- merge from PlanetLab Europe
[plcapi.git] / PLC / Methods / AdmGetNodeGroupNodes.py
index a040685..51c392a 100644 (file)
@@ -1,7 +1,7 @@
 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):
@@ -16,7 +16,7 @@ class AdmGetNodeGroupNodes(Method):
     roles = ['admin', 'pi', 'user', 'tech']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         Mixed(NodeGroup.fields['nodegroup_id'],
              NodeGroup.fields['name'])
         ]
@@ -30,7 +30,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']