'Method to provide a utils.run-like interface to execute command on
remote host or guest.
:param timeout: Total time duration to wait for command return.
:param ignore_status: If ignore_status=True, do not raise an exception,
no matter what the exit code of the command is.
Else, raise CmdError if exit code of command is not
zero.'

def run(self, command, timeout=60, ignore_status=False):

    command = ('%s    1>%s    2>%s' % (command, self.stdout_pipe, self.stderr_pipe))
    (status, _) = self.session.cmd_status_output(command, timeout=timeout)
    output = self.session.cmd_output(('cat    %s;rm    -f    %s' % (self.stdout_pipe, self.stdout_pipe)))
    errput = self.session.cmd_output(('cat    %s;rm    -f    %s' % (self.stderr_pipe, self.stderr_pipe)))
    cmd_result = utils.CmdResult(command=command, exit_status=status, stdout=output, stderr=errput)
    if (status and (not ignore_status)):
        raise error.CmdError(command, cmd_result)
    return cmd_result
