take out the code that computes a new key - for use by the dummynet boot medium creat...
[plcapi.git] / PLC / Methods / DeleteNodeFromNodeGroup.py
index dc289fa..2bc6770 100644 (file)
@@ -24,8 +24,6 @@ class DeleteNodeFromNodeGroup(Method):
 
     returns = Parameter(int, '1 if successful')
 
-    event_type = 'DeleteFrom'
-    object_type = 'NodeGroup'
 
     def call(self, auth, node_id_or_hostname, nodegroup_id_or_name):
         # Get node info
@@ -46,6 +44,10 @@ class DeleteNodeFromNodeGroup(Method):
         if node['node_id'] in nodegroup['node_ids']:
             nodegroup.remove_node(node)
        
-       self.object_ids = [nodegroup['nodegroup_id']]
+       # 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