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 <sage@newdream.net>
(cherry picked from commit
e5c1d4aa71ddf24304ec5d18b22bea739c20226d)
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 <clusterid> <placement>
-
-This updates the deployed cluster according to the placement value.
-
Delete NFS Ganesha Cluster
==========================
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:
"""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"""