]> 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, 3 Apr 2024 17:21:44 +0000 (22:51 +0530)
commit6d27be9241a6e2eb014954eec45ac73a85b367f7
treeff8546e8bb2ddbbc1f87e1d92fc8077a998a195b
parentf8c005e7cb8d17d6d744ea20e01b35a55bb356a3
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