take out the code that computes a new key - for use by the dummynet boot medium creat...
[plcapi.git] / PLC / Methods / DeleteNodeFromNodeGroup.py
index 380c2cc..2bc6770 100644 (file)
@@ -24,6 +24,7 @@ class DeleteNodeFromNodeGroup(Method):
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, node_id_or_hostname, nodegroup_id_or_name):
         # Get node info
        nodes = Nodes(self.api, [node_id_or_hostname])
@@ -42,5 +43,11 @@ class DeleteNodeFromNodeGroup(Method):
        # Remove node from nodegroup
         if node['node_id'] in nodegroup['node_ids']:
             nodegroup.remove_node(node)
+       
+       # Logging variables
+       self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']],
+                             'Node': [node['node_id']]}
+       self.message = 'node %d deleted from node group %d' % \
+               (node['node_id'], nodegroup['nodegroup_id'])
 
         return 1