X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeleteAddress.py;h=bc6ba5eeda2b338476c217aa3e6c440fa40c25fa;hb=71a2b50be6b8cea74ae3f55afecbff3b28e5798d;hp=24ec758ef6bb3cd322cd1b8927c448b0314432a2;hpb=3f30de17c58880c0f6f1d64ea573c3fe56e32a38;p=plcapi.git diff --git a/PLC/Methods/DeleteAddress.py b/PLC/Methods/DeleteAddress.py index 24ec758..bc6ba5e 100644 --- a/PLC/Methods/DeleteAddress.py +++ b/PLC/Methods/DeleteAddress.py @@ -1,3 +1,5 @@ +# $Id$ +# $URL$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -21,9 +23,7 @@ class DeleteAddress(Method): ] returns = Parameter(int, '1 if successful') - - event_type = 'Delete' - object_type = 'Address' + def call(self, auth, address_id): # Get associated address details @@ -37,6 +37,9 @@ class DeleteAddress(Method): raise PLCPermissionDenied, "Address must be associated with one of your sites" address.delete() - self.object_ids = [address['address_id']] + + # Logging variables + self.event_objects = {'Address': [address['address_id']]} + self.message = 'Address %d deleted' % address['address_id'] return 1