# Thierry Parmentelat <thierry.parmentelat@inria.fr>
-# Copyright (C) 2010 INRIA
+# Copyright (C) 2010 INRIA
#
import os, os.path
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):
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))
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
"run (as PI) sfi show <slice> -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
@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
def sfa_delete_slice (self, *args, **kwds): pass
@slice_sfa_mapper
def ssh_slice_sfa (self, *args, **kwds): pass
-