def run_command_as_root(self, command, check_exit_code=True): """Run a remote command as root using an active ssh connection. :param command: List of commands. """ self._set_connection() stdout, stderr = common.ssh_command_as_root(self._connection, command, check_exit_code=check_exit_code) return stdout.read().splitlines()
def run_command_as_root(self, command, check_exit_code=True): """Run a remote command as root using an active ssh connection. :param command: List of commands. """ stdout, stderr = common.ssh_command_as_root( self._connection, command, check_exit_code=check_exit_code) return stdout.read().splitlines()
def run_vios_command_as_root(self, command, check_exit_code=True): """Run a remote command as root using an active ssh connection. :param command: List of commands. """ self._set_connection() stdout, stderr = common.ssh_command_as_root( self._connection, command, check_exit_code=check_exit_code) error_text = stderr.read() if error_text: LOG.debug(_("Found error stream for command \"%(command)s\":" " %(error_text)s"), {'command': command, 'error_text': error_text}) return stdout.read().splitlines()
def run_vios_command_as_root(self, command, check_exit_code=True): """Run a remote command as root using an active ssh connection. :param command: List of commands. """ self._set_connection() stdout, stderr = common.ssh_command_as_root(self._connection, command, check_exit_code=check_exit_code) error_text = stderr.read() if error_text: LOG.warn( _('Found error stream for command "%(command)s":' " %(error_text)s"), {"command": command, "error_text": error_text}, ) return stdout.read().splitlines()
def run_vios_command_as_root(self, command, check_exit_code=True): """Run a remote command as root using an active ssh connection. :param command: List of commands. """ self._set_connection() stdout, stderr = common.ssh_command_as_root( self._connection, command, check_exit_code=check_exit_code) error_text = stderr.read() if error_text: LOG.debug( _("Found error stream for command \"%(command)s\":" " %(error_text)s") % locals()) return stdout.read().splitlines()