2 from qa.Test import Test
5 class remote_call(Test):
7 Attempt to connect to a node using the plc root key and
11 def call(self, root_key_path, hostname, command):
12 if not os.path.isfile(root_key_path):
13 raise Exception, "no such private key file %(root_key_path)s" % locals()
15 full_command = "ssh -i %(root_key_path)s root@%(hostname) %(command)s" % locals()
16 if self.config.verbose:
17 utils.header(full_command)
18 (stdout, stderr) = utils.popen(full_command)
19 if self.config.verbose:
20 utils.header("\n".join(stdout))