3 from qa.Test import Test
8 Completely removes the installed myplc
11 def call(self, system_type, root_dir):
13 remove_command = " rpm -e myplc "
16 if system_type in ['vserv', 'vserver']:
17 full_command += " vserver %(root_dir)s exec "
18 elif system_type in ['chroot']:
21 raise Exception, "Invalid system type %(system_type)s" % locals()
23 if self.config.verbose:
24 utils.header("Removing myplc")
26 full_command = full_command % locals()
27 (stdout, stderr) = utils.popen(full_command + "service plc safestop")
28 if self.config.verbose:
29 utils.header("\n".join(stdout))
31 (stdin, stdout, stderr) = utils.popen(full_command + remove_command)
32 if self.config.verbose:
33 utils.header("\n".join(stdout))
35 (stdin, stdout, stderr) = utils.popen(full_command + " rm -rf /plc/data")
36 if self.config.verbose:
37 utiils.header("\n".join(stdout))