def name(self):
return self.sfa_slice_spec['slice_fields']['name']
- def mode (self): return self.sfa_slice_spec['mode']
+ def rspecmode (self): return self.sfa_slice_spec['rspecmode']
def hrn(self):
root_auth=self.test_plc.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH']
def reqfile (self): return self.resname("req","rspec")
def nodefile (self): return self.resname("nodes","txt")
def discover_option(self):
- if self.mode()=='pg': return "-r protogeni"
+ if self.rspecmode()=='pg': return "-r protogeni"
else: return ""
def sfi_path (self):
'SFA_PLC_URL' : 'deferred-myplc-api-url',
'SFA_API_DEBUG': True,
# details of the slices to create
- # xxx framework is ready to use pg rspecs, but code is not yet
- 'sfa_slice_specs' : [ sfa_slice_spec(options,index,mode)
- for mode in ['pl']],
+ 'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspecmode)
+ for rspecmode in ['pl','pg']],
}
# subindex is 0 (pl slice) or 1 (pg slice)
-def sfa_slice_spec (options,index,mode):
+def sfa_slice_spec (options,index,rspecmode):
the_login_base=login_base(index)
piuser='fake-pi%d'%index
- regularuser='sfauser%d%s'%(index,mode)
- slicename='slsfa%d%s'%(index,mode)
+ regularuser='sfauser%d%s'%(index,rspecmode)
+ slicename='slsfa%d%s'%(index,rspecmode)
prefix='%s.%s'%(sfa_root(index),the_login_base)
hrn=prefix+'.'+slicename
+ person_hrn=prefix+'.'+regularuser
researcher=prefix+'.'+piuser
slice_add_xml = '''<record hrn="%s" type="slice" description="SFA-testing" url="http://test.onelab.eu/">
<researcher>%s</researcher></record>'''%(hrn, researcher)
mail="%s@%s"%(regularuser,domain)
+ 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="%(hrn)s"
+ slice_person_xml ='''<record email="%(mail)s" enabled="True" first_name="Fake" hrn="%(person_hrn)s"
last_name="Sfa" 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()
'slicename' : slicename,
'slice_add_xml' : slice_add_xml,
'slice_person_xml' : slice_person_xml,
- 'mode':mode,
+ 'rspecmode':rspecmode,
}
--- /dev/null
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA
+#
+from TestPlc import TestPlc
+
+def run01sfa_plcclean (test_plc): return test_plc.sfa_plcclean()
+def run02sfa_dbclean (test_plc): return test_plc.sfa_dbclean()
+def run03sfa_import (test_plc): return test_plc.sfa_import()
+def run04sfi_configure (test_plc): return test_plc.sfi_configure()
+def run05sfa_add_user (test_plc): return test_plc.sfa_add_user()
+def run06sfa_add_slice (test_plc): return test_plc.sfa_add_slice()
+def run07sfa_discover (test_plc): return test_plc.sfa_discover()
+def run08sfa_create_slice (test_plc): return test_plc.sfa_create_slice()
+def run09sfa_check_slice_plc (test_plc): return test_plc.sfa_check_slice_plc()
+def run10sfa_update_user (test_plc): return test_plc.sfa_update_user()
+def run11sfa_update_slice (test_plc): return test_plc.sfa_update_slice()
+def run12sfa_view (test_plc): return test_plc.sfa_view()
+def run13sfa_utest (test_plc): return test_plc.sfa_utest()
+def run14sfa_delete_slice (test_plc): return test_plc.sfa_delete_slice()
+def run15sfa_delete_user (test_plc): return test_plc.sfa_delete_user()
--- /dev/null
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA
+#
+from TestPlc import TestPlc
+
+def run01_pcleean (test_plc):
+ return test_plc.sfa_plcclean()
+def run02_dclean (test_plc):
+ return test_plc.sfa_dbclean()
+def run03_lclean (test_plc):
+ return test_plc.logclean_sfa()
+def run04_stop (test_plc):
+ return test_plc.sfa_stop()
+def run11_iclean (test_plc):
+ return test_plc.sfi_clean()
+def run21_conf (test_plc):
+ return test_plc.sfa_configure()
+def run22_import (test_plc):
+ return test_plc.sfa_import()
+def run23_start (test_plc):
+ return test_plc.sfa_start()
+def run31_iconf (test_plc):
+ return test_plc.sfi_configure()