]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/{ceph_manager.py,vstart_runner.py}: allow kwargs in raw_*
authorDan Mick <dan.mick@redhat.com>
Thu, 28 Jun 2018 22:36:25 +0000 (15:36 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 29 Jun 2018 21:51:34 +0000 (14:51 -0700)
Allow passing kwargs (like stdin=) to the local and teuthology
clusters when running tests

Signed-off-by: Dan Mick <dan.mick@redhat.com>
qa/tasks/ceph_manager.py
qa/tasks/vstart_runner.py

index 758c7e1484173725332e09d76ebf16b05b81b8dc..e507782f13619c3a49ce2fad54c539d424f54a9a 100644 (file)
@@ -1135,7 +1135,7 @@ class CephManager:
             )
         return proc.stdout.getvalue()
 
-    def raw_cluster_cmd_result(self, *args):
+    def raw_cluster_cmd_result(self, *args, **kwargs):
         """
         Start ceph on a cluster.  Return success or failure information.
         """
@@ -1152,10 +1152,9 @@ class CephManager:
             self.cluster,
         ]
         ceph_args.extend(args)
-        proc = self.controller.run(
-            args=ceph_args,
-            check_status=False,
-            )
+        kwargs['args'] = ceph_args
+        kwargs['check_status'] = False
+        proc = self.controller.run(**kwargs)
         return proc.exitstatus
 
     def run_ceph_w(self):
index 048376f5acf8fe70199cdbddc15bbb8b3cc41fc6..87e45e0f840bc75b225930ea2fbb9907d585eac8 100644 (file)
@@ -552,19 +552,20 @@ class LocalCephManager(CephManager):
         proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph"), "-w"], wait=False, stdout=StringIO())
         return proc
 
-    def raw_cluster_cmd(self, *args):
+    def raw_cluster_cmd(self, *args, **kwargs):
         """
         args like ["osd", "dump"}
         return stdout string
         """
-        proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph")] + list(args))
+        proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph")] + list(args), **kwargs)
         return proc.stdout.getvalue()
 
-    def raw_cluster_cmd_result(self, *args):
+    def raw_cluster_cmd_result(self, *args, **kwargs):
         """
         like raw_cluster_cmd but don't check status, just return rc
         """
-        proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph")] + list(args), check_status=False)
+        kwargs['check_status'] = False
+        proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph")] + list(args), **kwargs)
         return proc.exitstatus
 
     def admin_socket(self, daemon_type, daemon_id, command, check_status=True):