'initscripts', 'sites', 'nodes', 'slices', 'nodegroups', 'leases', SEP,
'nodestate_reinstall', 'qemu_local_init','bootcd', 'qemu_local_config', SEP,
'qemu_export', 'qemu_kill_mine', 'qemu_start', 'timestamp_qemu', SEP,
- 'sfa_install', 'sfa_tables_install', 'sfa_plc_install', 'sfa_client_install', SEPSFA,
- 'sfa_configure', 'cross_sfa_configure', 'sfa_start', 'sfa_import', SEPSFA,
+ 'sfa_install_all', 'sfa_configure', 'cross_sfa_configure', 'sfa_start', 'sfa_import', SEPSFA,
'sfi_configure@1', 'sfa_add_user@1', 'sfa_add_slice@1', 'sfa_discover@1', SEPSFA,
'sfa_create_slice@1', 'sfa_check_slice_plc@1', SEPSFA,
'sfa_update_user@1', 'sfa_update_slice@1', 'sfa_view@1', 'sfa_utest@1',SEPSFA,
'populate' , SEP,
'nodestate_show','nodestate_safeboot','nodestate_boot', SEP,
'qemu_list_all', 'qemu_list_mine', 'qemu_kill_all', SEP,
- 'sfa_plcclean', 'sfa_dbclean', 'sfa_stop','sfa_uninstall', 'sfi_clean', SEP,
+ 'sfa_install_core', 'sfa_install_sfatables', 'sfa_install_plc', 'sfa_install_client', SEPSFA,
+ 'sfa_plcclean', 'sfa_dbclean', 'sfa_stop','sfa_uninstall', 'sfi_clean', SEPSFA,
'plc_db_dump' , 'plc_db_restore', SEP,
'standby_1_through_20',SEP,
]
if isinstance (rpms, list):
rpms=" ".join(rpms)
self.run_in_guest("yum -y install %s"%rpms)
- return self.run_in_guest("rpm -q %s"%rpms)==0
+ # yum-complete-transaction comes with yum-utils, that is in vtest.pkgs
+ self.run_in_guest("yum-complete-transaction -y")
+ return self.run_in_guest("rpm -q %s"%rpms)==0
def auth_root (self):
return {'Username':self.plc_spec['PLC_ROOT_USER'],
'PLC_MAIL_ENABLED',
'PLC_MAIL_SUPPORT_ADDRESS',
'PLC_DB_HOST',
- 'PLC_DB_PASSWORD',
+# 'PLC_DB_PASSWORD',
# Above line was added for integrating SFA Testing
'PLC_API_HOST',
'PLC_WWW_HOST',
# in particular runs with --preserve (dont cleanup) and without --check
# also it gets run twice, once with the --foreign option for creating fake foreign entries
- ### sfa_install_rpm
- def sfa_install(self):
+ def sfa_install_all (self):
+ "yum install sfa sfa-plc sfa-sfatables sfa-client"
+ return self.yum_install ("sfa sfa-plc sfa-sfatables sfa-client")
+
+ def sfa_install_core(self):
"yum install sfa"
return self.yum_install ("sfa")
- ### sfa_install_rpm
- def sfa_plc_install(self):
+ def sfa_install_plc(self):
"yum install sfa-plc"
return self.yum_install("sfa-plc")
- ### sfa_install_rpm
- def sfa_client_install(self):
+ def sfa_install_client(self):
"yum install sfa-client"
return self.yum_install("sfa-client")
- ### sfa_install_rpm
- def sfa_tables_install(self):
- "yum install sfa-client"
+ def sfa_install_sfatables(self):
+ "yum install sfa-sfatables"
return self.yum_install ("sfa-sfatables")
def sfa_dbclean(self):
"thoroughly wipes off the SFA database"
- self.run_in_guest("sfa-nuke-plc.py")==0
+ self.run_in_guest("sfa-nuke.py")==0 or \
+ self.run_in_guest("sfa-nuke-plc.py") or \
+ self.run_in_guest("sfaadmin.py registry nuke")
return True
def sfa_plcclean(self):
fileconf=open(tmpname,'w')
for var in [ 'SFA_REGISTRY_ROOT_AUTH',
'SFA_INTERFACE_HRN',
-# 'SFA_REGISTRY_LEVEL1_AUTH',
+ 'SFA_REGISTRY_LEVEL1_AUTH',
'SFA_REGISTRY_HOST',
'SFA_AGGREGATE_HOST',
'SFA_SM_HOST',
'SFA_DB_HOST',
'SFA_DB_USER',
'SFA_DB_PASSWORD',
- # should be tmp
'SFA_DB_NAME',
+ 'SFA_API_LOGLEVEL',
]:
- fileconf.write ('e %s\n%s\n'%(var,self.plc_spec['sfa'][var]))
+ if self.plc_spec['sfa'].has_key(var):
+ fileconf.write ('e %s\n%s\n'%(var,self.plc_spec['sfa'][var]))
# the way plc_config handles booleans just sucks..
- for var in ['SFA_API_DEBUG']:
+ for var in []:
val='false'
if self.plc_spec['sfa'][var]: val='true'
fileconf.write ('e %s\n%s\n'%(var,val))
def sfa_import(self):
"sfa-import-plc"
- auth=self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH']
- return self.run_in_guest('sfa-import-plc.py')==0
+ auth=self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH']
+ return self.run_in_guest('sfa-import.py')==0 or \
+ self.run_in_guest('sfa-import-plc.py')==0 or \
+ self.run_in_guest('sfaadmin.py registry import_registry')==0
# not needed anymore
# self.run_in_guest('cp /etc/sfa/authorities/%s/%s.pkey /etc/sfa/authorities/server.key'%(auth,auth))