set max_slices to 2 by default as sfa_admin has no means to set that yet
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 13 May 2012 21:58:37 +0000 (23:58 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 13 May 2012 21:58:37 +0000 (23:58 +0200)
sfa/planetlab/pldriver.py

index 0fb4fc3..76f54da 100644 (file)
@@ -71,6 +71,9 @@ class PlDriver (Driver):
         if type == 'authority':
             sites = self.shell.GetSites([pl_record['login_base']])
             if not sites:
+                # xxx when a site gets registered through SFA we need to set its max_slices
+                if 'max_slices' not in pl_record:
+                    pl_record['max_slices']=2
                 pointer = self.shell.AddSite(pl_record)
             else:
                 pointer = sites[0]['site_id']