X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAdmGetPowerControlUnitNodes.py;h=af298ee0b208131505728b9370eaae19603bf949;hb=4e032a0867c7b8d99d0af92fdc2175918338f875;hp=6d3ce36130c8bff656787631cf82fa32941fb5cd;hpb=682e1251201c658ef45e38b0761fe79e787f2e3e;p=plcapi.git diff --git a/PLC/Methods/AdmGetPowerControlUnitNodes.py b/PLC/Methods/AdmGetPowerControlUnitNodes.py index 6d3ce36..af298ee 100644 --- a/PLC/Methods/AdmGetPowerControlUnitNodes.py +++ b/PLC/Methods/AdmGetPowerControlUnitNodes.py @@ -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]