add message attribute to let AddSliceToNodes method logged.
[plcapi.git] / PLC / Methods / AddSliceToNodes.py
index 8bad0ad..0c18759 100644 (file)
@@ -1,4 +1,5 @@
 # $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -64,7 +65,9 @@ class AddSliceToNodes(Method):
 
         slice.sync()
 
-       self.event_objects = {'Node': [node['node_id'] for node in nodes],
+        nodeids = [node['node_id'] for node in nodes]
+       self.event_objects = {'Node': nodeids,
                              'Slice': [slice['slice_id']]}
+        self.message = 'Slice %d added to nodes %s' % (slice['slice_id'], nodeids)
 
         return 1