-c sfadebug on the command line to increment API_LOGLEVEL
[tests.git] / system / config_default.py
index 80618d4..288b613 100644 (file)
@@ -333,6 +333,7 @@ def plc (options,index) :
         'leases' : leases (options, index),
     }
 
+# NOTE: SFA currently has SFA_AGGREGATE_API_VERSION=2 baked into the code
 def sfa (options,index) :
     return { 
         # the default is to use AMs in the various aggregates.xml
@@ -347,8 +348,7 @@ def sfa (options,index) :
        'SFA_PLC_URL' : 'deferred-myplc-api-url',
         'SFA_PLC_USER' : 'root@test.onelab.eu',
         'SFA_PLC_PASSWORD' : 'test++',
-# use -c apiv2 to override this one
-#        'SFA_AGGREGATE_API_VERSION' : 1,
+# use -c sfadebug to increment this one
         'SFA_API_LOGLEVEL': 1,
         # details of the slices to create
         'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspec_style) 
@@ -365,17 +365,20 @@ def sfa_slice_spec (options,index,rspec_style):
     hrn=prefix+'.'+slicename
     user_hrn=prefix+'.'+regularuser
     pi_hrn=prefix+'.'+piuser
-    slice_add_xml = '''<record hrn="%s" type="slice" description="SFA-testing" url="http://test.onelab.eu/">
+    key=public_key2
+    mail="%s@%s"%(regularuser,domain)
+    person_record_xml =\
+'''<record hrn="%(user_hrn)s" type="user" email="%(mail)s" enabled="True" 
+first_name="Fake" last_name="Sfa style=%(rspec_style)s" >
+<keys>%(key)s</keys>
+<roles>user</roles>
+<roles>tech</roles>
+</record>'''%locals()
+    slice_record_xml =\
+'''<record hrn="%s" type="slice" description="SFA-testing" url="http://test.onelab.eu/">
 <researcher>%s</researcher>
 </record>'''%(hrn, user_hrn)
 
-    mail="%s@%s"%(regularuser,domain)
-    print 'in sfa_slice_spec','slicename',slicename,'hrn',hrn,'mail',mail
-    key=public_key2
-    slice_person_xml ='''<record email="%(mail)s" enabled="True" first_name="Fake" hrn="%(user_hrn)s" 
-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()
 
     return { 'slice_fields': {'name':'%s_%s'%(the_login_base,slicename),
                               'url':'http://foo%d@foo.com'%index,
@@ -386,12 +389,12 @@ last_name="Sfa %(rspec_style)s" name="%(hrn)s" type="user">
              'piuser' : piuser,
              'regularuser':regularuser,
              'domain':domain,
-             'usernames' : [ (regularuser,'key1') ],
+             'usernames' : [ (regularuser,'key2') ],
              'nodenames' : all_nodenames(options,index),
              'sitename' : the_login_base,
              'slicename' : slicename,
-             'slice_add_xml' : slice_add_xml,
-             'slice_person_xml' : slice_person_xml,
+             'slice_record' : slice_record_xml,
+             'person_record' : person_record_xml,
              'rspec_style':rspec_style,
              }