X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestAuthSfa.py;h=820b50e62330bb1b158b15cbf0c07dfcf4628eed;hb=3e10f188b2de3707ccfccc1b1e77f9459061e946;hp=2b1ac5fecfb789241769780188afcdedd226aaa6;hpb=c8e2f4e3a327181b29521583770a6f0ff68ca6eb;p=tests.git diff --git a/system/TestAuthSfa.py b/system/TestAuthSfa.py index 2b1ac5f..820b50e 100644 --- a/system/TestAuthSfa.py +++ b/system/TestAuthSfa.py @@ -1,5 +1,5 @@ # Thierry Parmentelat -# Copyright (C) 2010 INRIA +# Copyright (C) 2010 INRIA # import os, os.path @@ -39,18 +39,16 @@ def user_sfa_mapper (method): class TestAuthSfa: def __init__ (self, test_plc, auth_sfa_spec): - self.test_plc = test_plc - self.auth_sfa_spec = auth_sfa_spec + self.test_plc = test_plc + self.auth_sfa_spec = auth_sfa_spec self.test_ssh = TestSsh(self.test_plc.test_ssh) # # shortcuts self.login_base = self.auth_sfa_spec['login_base'] # self.piuser = self.auth_sfa_spec['piuser'] # self.regularuser = self.auth_sfa_spec['regularuser'] - - def rspec_style (self): return self.auth_sfa_spec['rspec_style'] def sfi_path (self): - return "/root/sfi/{}".format(self.rspec_style()) + return "/root/sfi" # the hrn for the root authority def root_hrn (self): @@ -91,21 +89,21 @@ class TestAuthSfa: fileconf.close() utils.header ("(Over)wrote {}".format(file_name)) # - file_name=dir_name + os.sep + 'sfi_config' + file_name=dir_name + os.sep + 'sfi_config' fileconf=open(file_name,'w') - SFI_AUTH=self.auth_hrn() + SFI_AUTH=self.auth_hrn() fileconf.write ("SFI_AUTH='{}'".format(SFI_AUTH)) - fileconf.write('\n') + fileconf.write('\n') # default is to run as a PI - SFI_USER=self.obj_hrn(self.auth_sfa_spec['pi_spec']['name']) + SFI_USER=self.obj_hrn(self.auth_sfa_spec['pi_spec']['name']) fileconf.write("SFI_USER='{}'".format(SFI_USER)) - fileconf.write('\n') - SFI_REGISTRY='http://{}:{}/'.format(sfa_spec['settings']['SFA_REGISTRY_HOST'], 12345) + fileconf.write('\n') + SFI_REGISTRY='http://{}:{}/'.format(sfa_spec['settings']['SFA_REGISTRY_HOST'], 12345) fileconf.write("SFI_REGISTRY='{}'".format(SFI_REGISTRY)) - fileconf.write('\n') - SFI_SM='http://{}:{}/'.format(sfa_spec['settings']['SFA_SM_HOST'], sfa_spec['sfi-connects-to-port']) + fileconf.write('\n') + SFI_SM='http://{}:{}/'.format(sfa_spec['settings']['SFA_AGGREGATE_HOST'], sfa_spec['sfi-connects-to-port']) fileconf.write("SFI_SM='{}'".format(SFI_SM)) - fileconf.write('\n') + fileconf.write('\n') fileconf.close() utils.header ("(Over)wrote {}".format(file_name)) @@ -158,13 +156,13 @@ class TestAuthSfa: def sfi_list (self, options): "run (as regular user) sfi list (on Registry)" - return \ + return \ self.test_plc.run_in_guest(self.sfi_user("list -r {}".format(self.root_hrn()))) == 0 and \ self.test_plc.run_in_guest(self.sfi_user("list {}".format(self.auth_hrn()))) == 0 def sfi_show_site (self, options): "run (as regular user) sfi show (on Registry)" - return \ + return \ self.test_plc.run_in_guest(self.sfi_user("show {}".format(self.auth_hrn()))) == 0 @@ -178,7 +176,7 @@ class TestAuthSfa: "run (as PI) sfi show -k researcher -k reg-researchers (on Registry)" return \ self.test_plc.run_in_guest(self.sfi_pi("show {} -k researcher -k reg-researchers".format(self.slice_hrn()))) == 0 - + # those are step names exposed as methods of TestPlc, hence the _sfa @slice_sfa_mapper @@ -200,6 +198,8 @@ class TestAuthSfa: @slice_sfa_mapper def sfa_provision_empty (self, *args, **kwds): pass @slice_sfa_mapper + def sfa_describe (self, *args, **kwds): pass + @slice_sfa_mapper def sfa_check_slice_plc (self, *args, **kwds): pass @slice_sfa_mapper def sfa_check_slice_plc_empty (self, *args, **kwds): pass @@ -209,4 +209,3 @@ class TestAuthSfa: def sfa_delete_slice (self, *args, **kwds): pass @slice_sfa_mapper def ssh_slice_sfa (self, *args, **kwds): pass -