X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestUserSfa.py;h=2a40afefc5adbf4a66017536d9b978353a28e389;hb=25de2f0b5602100459eeaadab5204aec2fc790ea;hp=d0a6f97b19fef6246efbd22da6b9f218975f67c7;hpb=86a192a57b7e78ea5b0bbb8427e30efc546a5bf6;p=tests.git diff --git a/system/TestUserSfa.py b/system/TestUserSfa.py index d0a6f97..2a40afe 100644 --- a/system/TestUserSfa.py +++ b/system/TestUserSfa.py @@ -19,20 +19,26 @@ class TestUserSfa: self.login_base=self.sfa_slice_spec['login_base'] def sfi_path(self): return self.test_slice_sfa.sfi_path() - def addpersonfile(self): return self.test_slice_sfa.addpersonfile() # xxx todo - not the right place any longer - or is it ? def add_user (self): - return self.test_plc.run_in_guest("sfi.py -d %s add %s"% - (self.sfi_path(),self.addpersonfile()))==0 + sfi_add_options = self.sfa_slice_spec['person_sfi_options'] + command="sfi -d %s add"%(self.sfi_path()) + for (opt,val) in sfi_add_options.items(): + command += " %s %s"%(opt,val) + # handle key separately because of embedded whitespace + # hack - the user's pubkey is avail from his hrn + hrn=sfi_add_options['-x'] + command += " -k %s/%s.pub"%(self.sfi_path(),hrn) + return self.test_plc.run_in_guest(command)==0 def update_user (self): - return self.test_plc.run_in_guest("sfi.py -d %s update %s"% - (self.sfi_path(),self.addpersonfile()))==0 + # xxx TODO now that we use sfi arguments + utils.header ("WARNING: TestUserSfa.update_user needs more work") + return True def delete_user(self): auth=self.sfa_spec['SFA_REGISTRY_ROOT_AUTH'] return \ - self.test_plc.run_in_guest("sfi.py -d %s remove -t user %s.%s.%s"%( + self.test_plc.run_in_guest("sfi -d %s remove -t user %s.%s.%s"%( self.sfi_path(),auth,self.login_base,self.regularuser))==0 -