Whitespace is not removed from the end of the stdout returned by the
method get_ceph_cmd_stdout(). Follow the same policy here since it is
better to not do so (this whitespace can be useful, when copying Ceph
auth keyrings from stdout to a file) and also for sake of uniformity of
interfaces.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit
9582b9b13a42fae4c7f38c22f9202eb893b6f1bc)
Conflicts:
qa/tasks/cephfs/mount.py
- Conflict occured for 2 reasons -
- One, method get_shell_stdout() is absent on Reef branch but not in
main so this patch which makes modification to it will obviously run
in to conflict
- Two, run_shell_payload() lies right next to get_shell_stdout() in
main branch and its definition is quite different, leading to
conflict again.
stdout=stdout, stderr=stderr,
omit_sudo=omit_sudo, **kwargs)
+ def get_shell_stdout(self, args, timeout=300, **kwargs):
+ return self.run_shell(args=args, timeout=timeout, **kwargs).stdout.\
+ getvalue()
+
def run_shell_payload(self, payload, **kwargs):
kwargs['args'] = ["bash", "-c", Raw(f"'{payload}'")]
if kwargs.pop('sudo', False):