5 from qa.Test import Test
12 def call(self, url=None, system_type, root_dir):
14 url_path = self.config.path
19 print self.config.path
20 url_file = open("%s/URL" % url_path)
21 url = url_file.read().strip()
26 print "URL not specified"
30 if self.config.verbose:
31 utils.header('Saving current myplc url into %s/URL' % url_path)
32 fsave=open('%s/URL' % url_path, "w")
36 # Instal myplc from url
37 if self.config.verbose:
38 utils.header('Installing myplc from url %s' % url)
42 install_command = " rpm -Uvh %(url)s "
43 if system_type in ['vserv', 'vserver']:
44 full_command += " vserver %(root_dir)s exec "
45 elif system_type in ['chroot']:
48 raise Exception, "Invalid system type %(system_type)s" % locals()
50 full_command += install_command % locals()
51 (stdout, stderr) = utils.popen(full_command)
52 if self.config.verbose:
53 utils.header("\n".join(stdout))