From e5c1d4aa71ddf24304ec5d18b22bea739c20226d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 5 May 2021 12:59:44 -0400 Subject: [PATCH] mgr/nfs: remove 'nfs cluster update' This command is very awkward to implement unless all service spec fields are always required. That will soon mean both the placement *and* virtual_ip (if any), making it much less useful for a human to make use of. Instead, let them update yaml, or adjust the nfs and/or ingress specs directly. I don't think this command is needed. Signed-off-by: Sage Weil --- doc/cephfs/fs-nfs-exports.rst | 9 --------- src/pybind/mgr/nfs/cluster.py | 10 ---------- src/pybind/mgr/nfs/module.py | 5 ----- 3 files changed, 24 deletions(-) diff --git a/doc/cephfs/fs-nfs-exports.rst b/doc/cephfs/fs-nfs-exports.rst index 346b9cbe3154f..77d3f7e410661 100644 --- a/doc/cephfs/fs-nfs-exports.rst +++ b/doc/cephfs/fs-nfs-exports.rst @@ -53,15 +53,6 @@ cluster):: For more details, refer :ref:`orchestrator-cli-placement-spec` but keep in mind that specifying the placement via a YAML file is not supported. -Update NFS Ganesha Cluster -========================== - -.. code:: bash - - $ ceph nfs cluster update - -This updates the deployed cluster according to the placement value. - Delete NFS Ganesha Cluster ========================== diff --git a/src/pybind/mgr/nfs/cluster.py b/src/pybind/mgr/nfs/cluster.py index d7da069cd7bb6..a409d2cb0672d 100644 --- a/src/pybind/mgr/nfs/cluster.py +++ b/src/pybind/mgr/nfs/cluster.py @@ -85,16 +85,6 @@ class NFSCluster: except Exception as e: return exception_handler(e, f"NFS Cluster {cluster_id} could not be created") - @cluster_setter - def update_nfs_cluster(self, cluster_id, placement): - try: - if cluster_id in available_clusters(self.mgr): - self._call_orch_apply_nfs(placement) - return 0, "NFS Cluster Updated Successfully", "" - raise ClusterNotFound() - except Exception as e: - return exception_handler(e, f"NFS Cluster {cluster_id} could not be updated") - @cluster_setter def delete_nfs_cluster(self, cluster_id): try: diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py index 20437e3216197..4e597602f0059 100644 --- a/src/pybind/mgr/nfs/module.py +++ b/src/pybind/mgr/nfs/module.py @@ -68,11 +68,6 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): """Create an NFS Cluster""" return self.nfs.create_nfs_cluster(cluster_id=clusterid, placement=placement) - @CLICommand('nfs cluster update', perm='rw') - def _cmd_nfs_cluster_update(self, clusterid: str, placement: str) -> Tuple[int, str, str]: - """Updates an NFS Cluster""" - return self.nfs.update_nfs_cluster(cluster_id=clusterid, placement=placement) - @CLICommand('nfs cluster rm', perm='rw') def _cmd_nfs_cluster_rm(self, clusterid: str) -> Tuple[int, str, str]: """Removes an NFS Cluster""" -- 2.39.5