]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa/cephfs: create CephManager instance in CephFSTestCase
authorRishabh Dave <ridave@redhat.com>
Mon, 13 Mar 2023 13:05:50 +0000 (18:35 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 13 Mar 2024 13:42:30 +0000 (19:12 +0530)
commit9a586383d3e0cf1191b02d595758a26a4a126077
tree8e774113ffb7e8e42df124755ab5adc2c931b714
parent2b3445150bf4596cb467d1842c1dc6068cf73946
qa/cephfs: create CephManager instance in CephFSTestCase

To run a Ceph command conveniently, run_cluster_cmd(), raw_cluster_cmd()
or raw_cluster_cmd_result() must be called. These methods are available
in class CephManager which in turn is available only if an instance of
Filesystem, MDSCluster, CephCluster or MgrCluster is initialized. Having
an instance of CephManager in CephFSTestCase will provide easy access to
these methods.

For example, in CephFS tests writing "self.mon_manager.raw_cluser_cmd()"
instead of writing "self.mds_cluster.mon_manager.raw_cluster()" will
suffice.

This commit provides a basis for upcoming commits in this patch series.
With next patches, running Ceph command will be further simplified. Just
writing self.run_ceph_cmd() will suffice for running a CephFS command.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 0c0041005ee127e3a488b111181c1da8035d199c)
qa/tasks/cephfs/cephfs_test_case.py