]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: directly use ExportMgr and NFSCluster objects
authorVarsha Rao <varao@redhat.com>
Mon, 9 Aug 2021 19:00:16 +0000 (00:30 +0530)
committerAlfonso Martínez <almartin@redhat.com>
Wed, 3 Nov 2021 11:40:49 +0000 (12:40 +0100)
commitd96fb92cb55c42ad02ba596ea602f5f5440d39b4
tree1d0257a9e573b6ed7e68dca973b219b51c1e77e3
parent47b70748da812668f739b2ba2ce2ad983016dfdf
mgr/dashboard: directly use ExportMgr and NFSCluster objects

Using the objects directly provides access to other methods and helps in
avoiding repeatition.

mgr/dashboard/nfsganesha: remove tag

Since NFS v3 is no longer supported. We can remove tag.

mgr/nfs: define global constant to list supported FSALs

mgr/dashboard: directly list nfs clusters by directly importing available_cluster() method

The current dashboard api returns a list of following dictionary

{
   'pool': 'nfs-ganesha',
   'namespace': cluster_id,
   'type': 'orchestrator',
   'daemon_conf': None
}

None of these values are required for listing nfs cluster by mgr/nfs module.
Instead directly list available cluster names

mgr/dashboard: add comment to remove listing of daemons

As the configs are per cluster. There is no need to list daemons per cluster.

mgr/dashboard/controllers/nfsganesha: Add comments to update/remove status endpoint

This endpoint can be updated in suggested way or even removed. As it was
initially[1] introduced to check if dashboard pool and namespace configuration was
set.

[1] https://github.com/ceph/ceph/commit/824726393b185b8e5a8f17e66487dfde9f3c8b5c

mgr/nfs: remove fetch_cluster_obj()

There is no need to fetch NFSCluster class object. Directly
available_clusters() can be imported to list nfs clusters.

mgr/dashboard/controllers/nfsganesha: list exports based on cluster id

As mgr/nfs module lists based on cluster id.

mgr/dashboard/nfs: get and delete export by export id

Fixes: https://tracker.ceph.com/issues/46493
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 64178e1f5b0f26f5c17898e85c3d5b439e5f9dbf)
src/pybind/mgr/dashboard/controllers/nfsganesha.py
src/pybind/mgr/nfs/cluster.py
src/pybind/mgr/nfs/export.py
src/pybind/mgr/nfs/export_utils.py
src/pybind/mgr/nfs/module.py