+ def get_remote_command(self, command):
+ (command, options) = self.get_command(command)
+ if 'type' in self and self['type'] in ['vm']:
+ if 'redir_port' in self and self['redir_port']:
+ options += " -p %s " % self['redir_port']
+
+ # attempt ssh self['host'] is not the machine we are running on or
+ # if this is a virtual node
+ if 'host' in self and self['host'] not in ['localhost', self.config.hostname] or \
+ 'type' in self and self['type'] in ['vm']:
+ command = "ssh %s root@%s \"%s\" " % (options, self['host'], command)
+ return command
+