- def add_user (self):
- return self.test_plc.run_in_guest("sfi.py -d %s add %s"%
- (self.sfi_path(),self.addpersonfile()))==0
-
- def update_user (self):
- return self.test_plc.run_in_guest("sfi.py -d %s update %s"%
- (self.sfi_path(),self.addpersonfile()))==0
-
- def delete_user(self):
- auth=self.sfa_spec['SFA_REGISTRY_ROOT_AUTH']
+ def sfa_register_user (self,options):
+ "add a regular user using sfi register"
+ user_hrn = self.hrn()
+ command="register"
+ command += " --type user"
+ command += " --xrn %s"%user_hrn
+ command += " --email %s"%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 %s/%s.pub"%(self.sfi_path(),user_hrn)
+ return self.test_plc.run_in_guest(self.sfi_pi(command))==0
+
+ def sfa_update_user (self,options):
+ "update a user record using sfi update"
+ user_hrn = self.hrn()
+ 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"
+ user_hrn = self.hrn()
+ command="remove -t user %s"%user_hrn