1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Nodes import Node, Nodes
5 from PLC.PCUs import PCU, PCUs
6 from PLC.Auth import Auth
7 from PLC.Methods.AddNodeToPCU import AddNodeToPCU
9 class AdmAssociateNodeToPowerControlUnitPort(AddNodeToPCU):
11 Deprecated. See AddNodeToPCU.
16 roles = ['admin', 'pi', 'tech']
21 Parameter(int, 'PCU port number'),
22 Mixed(Node.fields['node_id'],
23 Node.fields['hostname']),
26 returns = Parameter(int, '1 if successful')
28 def call(self, auth, pcu_id, port, node_id_or_hostname):
29 return AddNodeToPCU(self, auth, node_id_or_hostname, pcu_id, port)