From 1108518604dbd28e5c19668fd3228cdc0338cf64 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 4 Mar 2008 16:30:41 +0000 Subject: [PATCH] split the install_rpm step into two steps first make the cache_rpm to get the rpm. second install the rpm locally --- system/TestMain.py | 2 +- system/TestPlc.py | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index 576e8bb..0dded73 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -16,7 +16,7 @@ class TestMain: default_config = [ 'onelab' ] - default_steps = ['uninstall','install','install_rpm', + default_steps = ['uninstall','install','cache_rpm','install_rpm', 'configure', 'start', 'clear_ssh_config','store_keys', 'initscripts', 'sites', 'nodes', 'slices', diff --git a/system/TestPlc.py b/system/TestPlc.py index 5785c15..38bdd84 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -257,12 +257,22 @@ class TestPlc: return self.install_vserver(options) else: return self.install_chroot(options) - + ### install_rpm + def cache_rpm(self,options): + self.run_in_host('rm -rf *.rpm') + utils.header('Curling rpm from %s'%options.myplc_url) + url=options.myplc_url + id= self.run_in_host('curl -O '+url) + if (id != 0): + raise Exception,"Could not get rpm from %s"%options.myplc_url + return False + return True + def install_rpm_chroot(self,options): - utils.header('Installing from %s'%options.myplc_url) - url=options.myplc_url - self.run_in_host('rpm -Uvh '+url) + rpm = os.path.basename(options.myplc_url) + utils.header('Installing the : %s'%rpm) + self.run_in_host('rpm -Uvh '+rpm) self.run_in_host('service plc mount') return True -- 2.47.0