From a8a05e2e29cbf91987f8e77e64301134ae457c6d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Oct 2019 14:17:31 -0500 Subject: [PATCH] mgr/orchestrator_cli: add 'rgw update' CLI command Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator_cli/module.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index 351212e94f3..8f3364f5221 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 " -- 2.39.5