- - removed anything having to do with event_type/event_object
[plcapi.git] / PLC / Methods / AddSite.py
index 10d6585..9bd1734 100644 (file)
@@ -2,11 +2,12 @@ from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.Sites import Site, Sites
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 
 can_update = lambda (field, value): field in \
              ['name', 'abbreviated_name', 'login_base',
-              'is_public', 'latitude', 'longitude', 'url']
+              'is_public', 'latitude', 'longitude', 'url',
+              'max_slices', 'max_slivers']
 
 class AddSite(Method):
     """
@@ -22,15 +23,12 @@ class AddSite(Method):
     site_fields = dict(filter(can_update, Site.fields.items()))
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         site_fields
         ]
 
     returns = Parameter(int, 'New site_id (> 0) if successful')
 
-    event_type = 'Add'
-    object_type = 'Site'
-    object_ids = []
 
     def call(self, auth, site_fields):
         site_fields = dict(filter(can_update, site_fields.items()))