-
- # command gets run on the right box
- def to_host(self,command):
- if self.is_local():
- return command
- else:
- return "ssh %s %s"%(self.plc_spec['hostname'],utils.backslash_shell_specials(command))
-
- def full_command(self,command):
- return self.to_host(self.host_to_guest(command))
-
- def run_in_guest (self,command):
- return utils.system(self.full_command(command))
- def run_in_host (self,command):
- return utils.system(self.to_host(command))
-
- # xxx quick n dirty
- def run_in_guest_piped (self,local,remote):
- return utils.system(local+" | "+self.full_command(remote))
-