get rid of svn keywords once and for good
[plcapi.git] / PLC / Methods / DeleteNodeGroup.py
index c038401..812af11 100644 (file)
@@ -18,13 +18,11 @@ class DeleteNodeGroup(Method):
     accepts = [
         Auth(),
         Mixed(NodeGroup.fields['nodegroup_id'],
-             NodeGroup.fields['name'])
+              NodeGroup.fields['groupname'])
         ]
 
     returns = Parameter(int, '1 if successful')
 
-    event_type = 'Delete'
-    object_type = 'NodeGroup'
 
     def call(self, auth, node_group_id_or_name):
         # Get account information
@@ -35,6 +33,9 @@ class DeleteNodeGroup(Method):
         nodegroup = nodegroups[0]
 
         nodegroup.delete()
-       self.object_ids = [nodegroup['nodegroup_id']]
+
+        # Logging variables
+        self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']]}
+        self.message  = 'Node group %d deleted' % nodegroup['nodegroup_id']
 
         return 1