From: Sage Weil Date: Sat, 7 Dec 2019 14:15:17 +0000 (-0600) Subject: mgr/orchestrator_cli: make rgw rm take realm+zone X-Git-Tag: v15.1.0~617^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32101%2Fhead;p=ceph.git mgr/orchestrator_cli: make rgw rm take realm+zone And adjust test accordingly Signed-off-by: Sage Weil --- diff --git a/qa/tasks/mgr/test_orchestrator_cli.py b/qa/tasks/mgr/test_orchestrator_cli.py index d69901752cb8..e62af60ceab6 100644 --- a/qa/tasks/mgr/test_orchestrator_cli.py +++ b/qa/tasks/mgr/test_orchestrator_cli.py @@ -138,7 +138,7 @@ class TestOrchestratorCli(MgrTestCase): self._orch_cmd("mds", "rm", "foo") def test_rgw_rm(self): - self._orch_cmd("rgw", "rm", "foo") + self._orch_cmd("rgw", "rm", "myrealm", "myzone") def test_nfs_rm(self): self._orch_cmd("nfs", "rm", "service_name") diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index d3c5839a90b1..83f9373bc157 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -500,9 +500,11 @@ Usage: @orchestrator._cli_write_command( 'orchestrator rgw rm', - "name=name,type=CephString", + 'name=realm_name,type=CephString ' + 'name=zone_name,type=CephString', 'Remove an RGW service') - def _rgw_rm(self, name): + def _rgw_rm(self, realm_name, zone_name): + name = realm_name + '.' + zone_name completion = self.remove_rgw(name) self._orchestrator_wait([completion]) orchestrator.raise_if_exception(completion)