From 278cd4dac3a219210ad7df00826e2c0d4f3186c1 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 18 Jan 2008 11:04:10 +0000 Subject: [PATCH] one more step --- system/TestMain.py | 11 +++++++---- system/TestPlc.py | 30 ++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index 5e7d8f8..668241f 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -16,10 +16,13 @@ class TestMain: default_config = [ 'onelab' ] - default_steps = ['uninstall','install','configure', 'start', 'store_keys', 'initscripts', - 'sites', 'nodes', 'slices', 'bootcd', - 'nodegroups', 'start_nodes', 'check_nodes', 'check_slices' ] - other_steps = [ 'fresh_install', 'stop', 'install_vserver_create', 'install_vserver_native', + default_steps = ['uninstall','install','install_rpm', + 'configure', 'start', + 'store_keys', 'initscripts', + 'sites', 'nodes', 'slices', + 'bootcd', 'nodegroups', + 'start_nodes', 'check_nodes', 'check_slices' ] + other_steps = [ 'fresh_install', 'stop', 'clean_sites', 'clean_nodes', 'clean_slices', 'clean_keys', 'stop_nodes' , 'db_dump' , 'db_restore', ] diff --git a/system/TestPlc.py b/system/TestPlc.py index 75c8205..9657451 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -115,14 +115,11 @@ class TestPlc: ### install def install_chroot(self,options): - utils.header('Installing from %s'%options.myplc_url) - url=options.myplc_url - utils.system('rpm -Uvh '+url) - utils.system('service plc mount') + # nothing to do return True # xxx this would not work with hostname != localhost as mylc-init-vserver was extracted locally - def install_vserver_create(self,options): + def install_vserver(self,options): # we need build dir for vtest-init-vserver build_dir=self.path+"/build" if not os.path.isdir(build_dir): @@ -139,16 +136,29 @@ class TestPlc: raise Exception,"Could not create vserver for %s"%self.vservername return True - def install_vserver_native(self,options): + def install(self,options): + if self.vserver: + return self.install_vserver(options) + else: + return self.install_chroot(options) + + ### install_rpm + def install_rpm_chroot(self,options): + utils.header('Installing from %s'%options.myplc_url) + url=options.myplc_url + utils.system('rpm -Uvh '+url) + utils.system('service plc mount') + return True + + def install_rpm_vserver(self,options): self.run_in_guest("yum -y install myplc-native") return True - def install(self,options): + def install_rpm(self,options): if self.vserver: - return self.install_vserver_create(options) - return self.install_vserver_native(options) + return self.install_rpm_vserver_create(options) else: - return self.install_chroot(options) + return self.install_rpm_chroot(options) ### def configure(self,options): -- 2.47.0