]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add stdin parameter to run_shell
authorRishabh Dave <ridave@redhat.com>
Thu, 21 Feb 2019 16:43:28 +0000 (22:13 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 17 Apr 2019 18:28:22 +0000 (23:58 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/mount.py
qa/tasks/vstart_runner.py

index 7bfa71b1d04fbc3ac40dffaa91953c13291a14ea..3efa624dd57253990e5cde9aa1cf3df3ff051723 100644 (file)
@@ -155,11 +155,12 @@ class CephFSMount(object):
         p.wait()
         return p.stdout.getvalue().strip()
 
-    def run_shell(self, args, wait=True, check_status=True, omit_sudo=True):
+    def run_shell(self, args, wait=True, stdin=None, check_status=True,
+                  omit_sudo=True):
         args = ["cd", self.mountpoint, run.Raw('&&'), "sudo"] + args
         return self.client_remote.run(args=args, stdout=StringIO(),
                                       stderr=StringIO(), wait=wait,
-                                      check_status=check_status,
+                                      stdin=stdin, check_status=check_status,
                                       omit_sudo=omit_sudo)
 
     def open_no_data(self, basename):
index 58fadbbbea355b8ccf23e57cbf5bf3de183e7cd6..f2dc0972a0c55f1c15c350a4a44f398db1e426f5 100644 (file)
@@ -459,12 +459,12 @@ class LocalFuseMount(FuseMount):
         # to avoid assumptions about daemons' pwd
         return os.path.abspath("./client.{0}.keyring".format(self.client_id))
 
-    def run_shell(self, args, wait=True, check_status=True, omit_sudo=True):
+    def run_shell(self, args, wait=True, stdin=None, check_status=True, omit_sudo=True):
         # FIXME maybe should add a pwd arg to teuthology.orchestra so that
         # the "cd foo && bar" shenanigans isn't needed to begin with and
         # then we wouldn't have to special case this
         return self.client_remote.run(args, wait=wait, cwd=self.mountpoint,
-                                      check_status=check_status,
+                                      stdin=stdin, check_status=check_status,
                                       omit_sudo=omit_sudo)
 
     def run_as_user(self, args, user, wait=True, stdin=None, check_status=True):