]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/ceph_manager: make raw_cluster_cmd() keywords args compatible
authorRishabh Dave <ridave@redhat.com>
Wed, 24 Feb 2021 19:49:49 +0000 (01:19 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 1 Mar 2021 13:08:55 +0000 (18:38 +0530)
In CephManager.raw_cluster_cmd(), pass only kwargs to run_cluster_cmd()
instead of both args and kwargs since passing both will lead to
"TypeError: got multiple values".

Fixes: https://tracker.ceph.com/issues/49495
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/ceph_manager.py

index f28565ef1cbf37bb778214c2cd4e548e56f80893..66cbd19f578ae2910b5999f7f3f2d396e15295d8 100644 (file)
@@ -1362,9 +1362,10 @@ class CephManager:
         """
         Start ceph on a raw cluster.  Return count
         """
-        stdout = kwargs.pop('stdout', StringIO())
-        p = self.run_cluster_cmd(args=args, stdout=stdout, **kwargs)
-        return p.stdout.getvalue()
+        if kwargs.get('args') is None and args:
+            kwargs['args'] = args
+        kwargs['stdout'] = kwargs.pop('stdout', StringIO())
+        return self.run_cluster_cmd(**kwargs).stdout.getvalue()
 
     def raw_cluster_cmd_result(self, *args, **kwargs):
         """