- re-enable return_fields specification
[plcapi.git] / PLC / Methods / AdmGetPowerControlUnitNodes.py
index 6d3ce36..af298ee 100644 (file)
@@ -2,7 +2,7 @@ from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.PCUs import PCU, PCUs
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 
 class AdmGetPowerControlUnitNodes(Method):
     """
@@ -15,10 +15,12 @@ class AdmGetPowerControlUnitNodes(Method):
     their sites.
     """
 
+    status = "deprecated"
+
     roles = ['admin', 'pi', 'tech']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         PCU.fields['pcu_id']
         ]
 
@@ -26,7 +28,7 @@ class AdmGetPowerControlUnitNodes(Method):
                 'port_number': Parameter(int, "Port number")}]
 
     def call(self, auth, pcu_id):
-        pcus = PCUs(self.api, [pcu_id]).values()
+        pcus = PCUs(self.api, [pcu_id])
         if not pcus:
             raise PLCInvalidArgument, "No such PCU"
         pcu = pcus[0]