Merge branch 'master' of ssh://git.onelab.eu/git/tests
[tests.git] / system / config_default.py
index fca0d68..2c280fa 100644 (file)
@@ -20,8 +20,10 @@ def login_base (index):
     else: return 'site%s'%chr(index+94)
 
 def sfa_root (index):
-    # pla, plb, ...
-    return 'pl%s'%chr(index+96)
+    # use plt (planetlab test) instead of pl
+    # otherwise a triangular test ends up with 'plc'
+    # plta, pltb, ...
+    return 'plt%s'%chr(index+96)
 
 def nodes(options,index):
     return [{'name':'node%d'%index,
@@ -274,7 +276,7 @@ def plc (options,index) :
         'PLC_MAIL_ENABLED':'false',
         'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@inria.fr',
         'PLC_DB_HOST' : 'deferred-myplc-hostname',
-        'PLC_DB_PASSWORD' : 'mnbvcxzlkjhgfdsapoiuytrewq',
+#        'PLC_DB_PASSWORD' : 'mnbvcxzlkjhgfdsapoiuytrewq',
         'PLC_API_HOST' : 'deferred-myplc-hostname',
         'PLC_WWW_HOST' : 'deferred-myplc-hostname',
         'PLC_BOOT_HOST' : 'deferred-myplc-hostname',
@@ -304,24 +306,23 @@ def sfa (options,index) :
        'SFA_REGISTRY_HOST' : 'deferred-myplc-hostname',
        'SFA_AGGREGATE_HOST': 'deferred-myplc-hostname',
        'SFA_SM_HOST': 'deferred-myplc-hostname',
+       'SFA_PLC_URL' : 'deferred-myplc-api-url',
         'SFA_PLC_USER' : 'root@test.onelab.eu',
         'SFA_PLC_PASSWORD' : 'test++',
-        'SFA_PLC_DB_HOST':'deferred-myplc-hostname',
-        'SFA_PLC_DB_USER' : 'pgsqluser',
-        'SFA_PLC_DB_PASSWORD' : 'mnbvcxzlkjhgfdsapoiuytrewq',
-       'SFA_PLC_URL' : 'deferred-myplc-api-url',
-        'SFA_API_DEBUG': True,
+# use -c apiv2 to override this one
+#        'SFA_AGGREGATE_API_VERSION' : 1,
+        'SFA_API_LOGLEVEL': 1,
         # details of the slices to create
-        'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspecmode) 
-                              for rspecmode in ['pl','pg']],
+        'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspec_style) 
+                              for rspec_style in options.rspec_styles ]
     }
 
 # subindex is 0 (pl slice) or 1 (pg slice)
-def sfa_slice_spec (options,index,rspecmode):
+def sfa_slice_spec (options,index,rspec_style):
     the_login_base=login_base(index)
     piuser='fake-pi%d'%index
-    regularuser='sfauser%d%s'%(index,rspecmode)
-    slicename='slsfa%d%s'%(index,rspecmode)
+    regularuser='sfauser%d%s'%(index,rspec_style)
+    slicename='slsfa%d%s'%(index,rspec_style)
     prefix='%s.%s'%(sfa_root(index),the_login_base)
     hrn=prefix+'.'+slicename
     person_hrn=prefix+'.'+regularuser
@@ -333,7 +334,7 @@ def sfa_slice_spec (options,index,rspecmode):
     print 'in sfa_slice_spec','slicename',slicename,'hrn',hrn,'mail',mail
     key=public_key
     slice_person_xml ='''<record email="%(mail)s" enabled="True" first_name="Fake" hrn="%(person_hrn)s" 
-last_name="Sfa" name="%(hrn)s" type="user">
+last_name="Sfa %(rspec_style)s" name="%(hrn)s" type="user">
 <keys>%(key)s</keys><role_ids>20</role_ids><role_ids>10</role_ids>
 <site_ids>1</site_ids><roles>pi</roles><roles>admin</roles><sites>%(prefix)s</sites></record>'''%locals()
 
@@ -352,7 +353,7 @@ last_name="Sfa" name="%(hrn)s" type="user">
              'slicename' : slicename,
              'slice_add_xml' : slice_add_xml,
              'slice_person_xml' : slice_person_xml,
-             'rspecmode':rspecmode,
+             'rspec_style':rspec_style,
              }