From: Thierry Parmentelat Date: Wed, 26 Oct 2011 10:26:50 +0000 (+0200) Subject: fixed a glitch that cause sfa-delete-user to fail X-Git-Tag: tests-5.0-30~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7f4a9320fef10c7d6417ce3c9438b718f7649745;p=tests.git fixed a glitch that cause sfa-delete-user to fail --- diff --git a/system/TestSliceSfa.py b/system/TestSliceSfa.py index eb865b7..82fa0ed 100644 --- a/system/TestSliceSfa.py +++ b/system/TestSliceSfa.py @@ -29,7 +29,7 @@ class TestSliceSfa: 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'] @@ -43,7 +43,7 @@ class TestSliceSfa: 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): diff --git a/system/config_default.py b/system/config_default.py index 1adf9b7..fca0d68 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -312,26 +312,27 @@ def sfa (options,index) : '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 = ''' %s'''%(hrn, researcher) mail="%s@%s"%(regularuser,domain) + print 'in sfa_slice_spec','slicename',slicename,'hrn',hrn,'mail',mail key=public_key - slice_person_xml =''' %(key)s2010 1piadmin%(prefix)s'''%locals() @@ -351,7 +352,7 @@ last_name="Sfa" name="%(hrn)s" type="user"> 'slicename' : slicename, 'slice_add_xml' : slice_add_xml, 'slice_person_xml' : slice_person_xml, - 'mode':mode, + 'rspecmode':rspecmode, } diff --git a/system/step_sfa.py b/system/step_sfa.py new file mode 100644 index 0000000..1dc046d --- /dev/null +++ b/system/step_sfa.py @@ -0,0 +1,20 @@ +# Thierry Parmentelat +# 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() diff --git a/system/step_sfarestart.py b/system/step_sfarestart.py new file mode 100644 index 0000000..8840f34 --- /dev/null +++ b/system/step_sfarestart.py @@ -0,0 +1,23 @@ +# Thierry Parmentelat +# 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()