Example #1
0
    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()
Example #2
0
    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()
Example #3
0
    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()
Example #4
0
    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()
Example #5
0
    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()