Merge branch 'master' of ssh://sapanb@git.planet-lab.org/git/plcapi
[plcapi.git] / PLC / Methods / DeleteAddressTypeFromAddress.py
index 3078737..2ddd753 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -25,6 +27,7 @@ class DeleteAddressTypeFromAddress(Method):
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, address_type_id_or_name, address_id):
         address_types = AddressTypes(self.api, [address_type_id_or_name])
         if not address_types:
@@ -41,5 +44,7 @@ class DeleteAddressTypeFromAddress(Method):
                 raise PLCPermissionDenied, "Address must be associated with one of your sites"
 
         address.remove_address_type(address_type)
+        self.event_objects = {'Address' : [address['address_id']],
+                              'AddressType': [address_type['address_type_id']]}
 
         return 1