git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge from HEAD
[plcapi.git]
/
PLC
/
Methods
/
AdmGetPowerControlUnitNodes.py
diff --git
a/PLC/Methods/AdmGetPowerControlUnitNodes.py
b/PLC/Methods/AdmGetPowerControlUnitNodes.py
index
6d3ce36
..
af298ee
100644
(file)
--- 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.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.PCUs import PCU, PCUs
-from PLC.Auth import
Password
Auth
+from PLC.Auth import Auth
class AdmGetPowerControlUnitNodes(Method):
"""
class AdmGetPowerControlUnitNodes(Method):
"""
@@
-15,10
+15,12
@@
class AdmGetPowerControlUnitNodes(Method):
their sites.
"""
their sites.
"""
+ status = "deprecated"
+
roles = ['admin', 'pi', 'tech']
accepts = [
roles = ['admin', 'pi', 'tech']
accepts = [
-
Password
Auth(),
+ Auth(),
PCU.fields['pcu_id']
]
PCU.fields['pcu_id']
]
@@
-26,7
+28,7
@@
class AdmGetPowerControlUnitNodes(Method):
'port_number': Parameter(int, "Port number")}]
def call(self, auth, 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]
if not pcus:
raise PLCInvalidArgument, "No such PCU"
pcu = pcus[0]