- command += "%s:%s/%s %s"%(self.hostname_part(),self.buildname,remote_file,local_file)
- utils.system(command)
+ # absolute path - do not preprend buildname
+ if remote_file.find("/") == 0:
+ remote_path = remote_file
+ else:
+ remote_path = "{}/{}".format(self.buildname, remote_file)
+ remote_path = self.fullname(remote_path)
+ command += "{}:{} {}".format(self.hostname_part(), remote_path, local_file)
+ return utils.system(command)
+
+ # this is only to avoid harmless message when host cannot be identified
+ # convenience only
+ # the only place where this is needed is when tring to reach a slice in a node,
+ # which is done from the test master box
+ def clear_known_hosts(self):
+ known_hosts = "{}/.ssh/known_hosts".format(os.getenv("HOME"))
+ utils.header("Clearing entry for {} in {}".format(self.hostname, known_hosts))
+ return utils.system("sed -i -e /^{}/d {}".format(self.hostname, known_hosts))
+