add message attribute to let AddSliceToNodes method logged.
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Mon, 25 Jan 2010 16:32:13 +0000 (16:32 +0000)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Mon, 25 Jan 2010 16:32:13 +0000 (16:32 +0000)
PLC/Methods/AddSliceToNodes.py

index 4a00a0e..0c18759 100644 (file)
@@ -65,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