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):
"""
their sites.
"""
+ status = "deprecated"
+
roles = ['admin', 'pi', 'tech']
accepts = [
- PasswordAuth(),
+ Auth(),
PCU.fields['pcu_id']
]
'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]