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 trunk; use initscript name instead of id
[plcapi.git]
/
PLC
/
Methods
/
AddNodeToPCU.py
diff --git
a/PLC/Methods/AddNodeToPCU.py
b/PLC/Methods/AddNodeToPCU.py
index
f1c1961
..
c0d5eff
100644
(file)
--- a/
PLC/Methods/AddNodeToPCU.py
+++ b/
PLC/Methods/AddNodeToPCU.py
@@
-3,6
+3,7
@@
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Nodes import Node, Nodes
from PLC.PCUs import PCU, PCUs
from PLC.Parameter import Parameter, Mixed
from PLC.Nodes import Node, Nodes
from PLC.PCUs import PCU, PCUs
+from PLC.Sites import Site, Sites
from PLC.Auth import Auth
class AddNodeToPCU(Method):
from PLC.Auth import Auth
class AddNodeToPCU(Method):
@@
-27,8
+28,6
@@
class AddNodeToPCU(Method):
returns = Parameter(int, '1 if successful')
returns = Parameter(int, '1 if successful')
- object_type = 'Node'
-
def call(self, auth, node_id_or_hostname, pcu_id, port):
# Get node
nodes = Nodes(self.api, [node_id_or_hostname])
def call(self, auth, node_id_or_hostname, pcu_id, port):
# Get node
nodes = Nodes(self.api, [node_id_or_hostname])
@@
-68,7
+67,8
@@
class AddNodeToPCU(Method):
pcu.add_node(node, port)
# Logging variables
pcu.add_node(node, port)
# Logging variables
- self.object_ids = [node['node_id'], pcu['pcu_id']]
+ self.event_objects = {'Node': [node['node_id']],
+ 'PCU': [pcu['pcu_id']]}
self.message = 'Node %d added to pcu %d on port %d' % \
(node['node_id'], pcu['pcu_id'], port)
return 1
self.message = 'Node %d added to pcu %d on port %d' % \
(node['node_id'], pcu['pcu_id'], port)
return 1