'qemu_export', 'qemu_kill_mine', 'qemu_start', 'timestamp_qemu', SEP,
'sfa_install_all', 'sfa_configure', 'cross_sfa_configure', 'sfa_start', 'sfa_import', SEPSFA,
'sfi_configure@1', 'sfa_add_site@1','sfa_add_pi@1', SEPSFA,
- 'sfa_add_user@1', 'sfa_add_slice@1', 'sfa_discover@1', SEPSFA,
- 'sfa_create_slice@1', 'sfa_check_slice_plc@1', SEPSFA,
- 'sfa_update_user@1', 'sfa_update_slice@1', SEPSFA,
+ 'sfa_add_user@1', 'sfa_update_user@1', 'sfa_add_slice@1', 'sfa_discover@1', SEPSFA,
+ 'sfa_create_slice@1', 'sfa_check_slice_plc@1', 'sfa_update_slice@1', SEPSFA,
'sfi_list@1', 'sfi_show@1', 'sfi_slices@1', 'sfa_utest@1', SEPSFA,
# we used to run plcsh_stress_test, and then ssh_node_debug and ssh_node_boot
# but as the stress test might take a while, we sometimes missed the debug mode..
sfi_command="add"
sfi_command += " --type slice"
sfi_command += " --xrn %s"%self.qualified(self.slice_spec['name'])
- for opt in self.slice_spec['sfi_options']:
+ for opt in self.slice_spec['add_options']:
sfi_command += " %s"%(opt)
return self.test_plc.run_in_guest(self.sfi_pi(sfi_command))==0
# xxx todo - not the right place any longer - or is it ?
def sfa_add_user (self,options):
"add a regular user using sfi add"
- sfi_add_options = self.user_spec['sfi_options']
user_hrn = self.qualified(self.user_spec['name'])
- command="%s add"%(self.sfi_path())
+ command="add"
command += " --type user"
command += " --xrn %s"%user_hrn
command += " --email %s"%self.user_spec['email']
- for opt in sfi_add_options:
- command += " %s"%(opt,)
+ command += " " + " ".join(self.user_spec['add_options'])
# handle key separately because of embedded whitespace
# hack - the user's pubkey is avail from his hrn
command += " -k %s/%s.pub"%(self.sfi_path(),user_hrn)
def sfa_update_user (self,options):
"update a user record using sfi update"
- # xxx TODO now that we use sfi arguments
- utils.header ("WARNING: TestUserSfa.update_user needs more work")
- return True
+ user_hrn = self.qualified(self.user_spec['name'])
+ command="update"
+ command += " --type user"
+ command += " --xrn %s"%user_hrn
+ command += " " + " ".join(self.user_spec['update_options'])
+ return self.test_plc.run_in_guest(self.sfi_pi(command))==0
def sfa_delete_user(self,options):
"run sfi delete on user record"
'name': 'us',
'email': full_mail ('regularuser'),
'key_name': 'key_sfauser',
- 'sfi_options': [ '--extra',"enabled=true",
- '--extra',"first_name=Fake",
+ 'add_options': [ '--extra',"first_name=Fake",
'--extra',"last_name=SFA-style-%s"%rspec_style,
],
+ 'update_options': [ '--extra',"enabled=true",
+ ],
}
slice_spec = {
'name': 'sl',
- 'sfi_options': [ '--researchers', user_hrn,
+ 'add_options': [ '--researchers', user_hrn,
# xxx
'--extra', "description=SFA-testing-%s"%rspec_style,
'--extra', "url=http://slice%d.test.onelab.eu/"%index,