- def update_user (self):
- return self.test_plc.run_in_guest("sfi.py -d /root/.sfi/ update person.xml")==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"
+ user_hrn = self.qualified(self.user_spec['name'])
+ command="add"
+ command += " --type user"
+ command += " --xrn %s"%user_hrn
+ command += " --email %s"%self.user_spec['email']
+ 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)
+ return self.test_plc.run_in_guest(self.sfi_pi(command))==0