- 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_register_user (self, options):
+ "add a regular user using sfi register"
+ user_hrn = self.hrn()
+ command = "register"
+ command += " --type user"
+ command += " --xrn {}".format(user_hrn)
+ command += " --email {}".format(self.user_spec['email'])
+ command += " " + " ".join(self.user_spec['register_options'])
+ # handle key separately because of embedded whitespace
+ # hack - the user's pubkey is avail from his hrn
+ command += " -k {}/{}.pub".format(self.sfi_path(), user_hrn)
+ return self.test_plc.run_in_guest(self.sfi_pi(command)) == 0