svn keywords
[plcapi.git] / PLC / Methods / AddSiteAddress.py
index 6f2c5dc..7a93821 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -32,10 +34,6 @@ class AddSiteAddress(Method):
 
     returns = Parameter(int, 'New address_id (> 0) if successful')
 
-    event_type = 'Add'
-    object_type = 'Address'
-    object_ids = []
-
     def call(self, auth, site_id_or_login_base, address_fields):
         address_fields = dict(filter(can_update, address_fields.items()))
 
@@ -53,6 +51,10 @@ class AddSiteAddress(Method):
         address.sync(commit = False)
         site.add_address(address, commit = True)
 
-       self.object_ids = [site['site_id'], address['address_id']]
+       # Logging variables
+       self.event_objects = {'Site': [site['site_id']], 
+                             'Address': [address['address_id']]}
+       self.message = 'Address %d assigned to Site %d' % \
+               (address['address_id'], site['site_id'])
 
         return address['address_id']