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
log getbootmedium calls
[plcapi.git]
/
PLC
/
Methods
/
AddNode.py
diff --git
a/PLC/Methods/AddNode.py
b/PLC/Methods/AddNode.py
index
e355dca
..
25e1172
100644
(file)
--- a/
PLC/Methods/AddNode.py
+++ b/
PLC/Methods/AddNode.py
@@
-1,3
+1,4
@@
+# $Id#
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
@@
-33,9
+34,6
@@
class AddNode(Method):
returns = Parameter(int, 'New node_id (> 0) if successful')
returns = Parameter(int, 'New node_id (> 0) if successful')
- object_type = 'Node'
-
-
def call(self, auth, site_id_or_login_base, node_fields):
node_fields = dict(filter(can_update, node_fields.items()))
def call(self, auth, site_id_or_login_base, node_fields):
node_fields = dict(filter(can_update, node_fields.items()))
@@
-62,7
+60,8
@@
class AddNode(Method):
node['site_id'] = site['site_id']
node.sync()
node['site_id'] = site['site_id']
node.sync()
- self.object_ids = [site['site_id'], node['node_id']]
+ self.event_objects = {'Site': [site['site_id']],
+ 'Node': [node['node_id']]}
self.message = "Node %s created" % node['node_id']
return node['node_id']
self.message = "Node %s created" % node['node_id']
return node['node_id']