X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeleteNodeGroup.py;h=680e718608f9547ebcf75cd743faf313971f9c41;hb=b3bb59d264e4bc94efdf4a407e8d93d1768b92c5;hp=c038401ba38e4d97ad24bad8299c70e23a807d9e;hpb=3f30de17c58880c0f6f1d64ea573c3fe56e32a38;p=plcapi.git diff --git a/PLC/Methods/DeleteNodeGroup.py b/PLC/Methods/DeleteNodeGroup.py index c038401..680e718 100644 --- a/PLC/Methods/DeleteNodeGroup.py +++ b/PLC/Methods/DeleteNodeGroup.py @@ -1,3 +1,5 @@ +# $Id$ +# $URL$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -18,13 +20,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 +35,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