1 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
2 # Copyright (C) 2010 INRIA
11 def __init__ (self,test_plc,sfa_slice_spec,test_slice_sfa):
12 self.test_plc=test_plc
13 self.sfa_slice_spec=sfa_slice_spec
14 self.test_slice_sfa=test_slice_sfa
16 self.sfa_spec=test_plc.plc_spec['sfa']
17 self.piuser=self.sfa_slice_spec['piuser']
18 self.regularuser=self.sfa_slice_spec['regularuser']
19 self.login_base=self.sfa_slice_spec['login_base']
21 def sfi_path(self): return self.test_slice_sfa.sfi_path()
22 def addpersonfile(self): return self.test_slice_sfa.addpersonfile()
24 # xxx todo - not the right place any longer - or is it ?
26 return self.test_plc.run_in_guest("sfi.py -d %s add %s"%
27 (self.sfi_path(),self.addpersonfile()))==0
29 def update_user (self):
30 return self.test_plc.run_in_guest("sfi.py -d %s update %s"%
31 (self.sfi_path(),self.addpersonfile()))==0
33 def delete_user(self):
34 auth=self.sfa_spec['SFA_REGISTRY_ROOT_AUTH']
36 self.test_plc.run_in_guest("sfi.py -d %s remove -t user %s.%s.%s"%(
37 self.sfi_path(),auth,self.login_base,self.regularuser))==0