From: Sage Weil Date: Thu, 31 Oct 2019 19:17:31 +0000 (-0500) Subject: mgr/orchestrator_cli: add 'rgw update' CLI command X-Git-Tag: v15.1.0~1031^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8a05e2e29cbf91987f8e77e64301134ae457c6d;p=ceph.git mgr/orchestrator_cli: add 'rgw update' CLI command Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index 351212e94f3c..8f3364f52218 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -298,6 +298,21 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator rgw update', + "name=zone_name,type=CephString " + "name=num,type=CephInt " + "name=hosts,type=CephString,n=N,req=false", + 'Update the number of RGW instances for the given zone') + def _rgw_update(self, zone_name, num, hosts=None): + spec = orchestrator.RGWSpec( + rgw_zone=zone_name, + placement=orchestrator.PlacementSpec(nodes=hosts), + count=num or 1) + completion = self.update_rgw(spec) + self._orchestrator_wait([completion]) + orchestrator.raise_if_exception(completion) + return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator nfs add', "name=svc_arg,type=CephString " "name=pool,type=CephString "