From 5122d323c4cf69aaafca6c3b60f9da6eccf465bb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Nov 2019 11:26:49 -0600 Subject: [PATCH] mgr/orchestrator_cli: rearrange things a bit Group services together Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator_cli/module.py | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index cde3fde88e2..a9bcf3ae6e9 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -382,6 +382,15 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator rbd-mirror rm', + "name=name,type=CephString,req=false", + 'Remove rbd-mirror service or rbd-mirror service instance') + def _rbd_mirror_rm(self, name=None): + completion = self.remove_rbd_mirror(name) + self._orchestrator_wait([completion]) + orchestrator.raise_if_exception(completion) + return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator mds add', "name=fs_name,type=CephString " "name=num,type=CephInt,req=false " @@ -412,6 +421,15 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator mds rm', + "name=name,type=CephString", + 'Remove an MDS service (mds id or fs_name)') + def _mds_rm(self, name): + completion = self.remove_mds(name) + self._orchestrator_wait([completion]) + orchestrator.raise_if_exception(completion) + return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator rgw add', 'name=zone_name,type=CephString,req=false ' 'name=num,type=CephInt,req=false ' @@ -459,6 +477,15 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator rgw rm', + "name=name,type=CephString", + 'Remove an RGW service') + def _rgw_rm(self, name): + completion = self.remove_rgw(name) + 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 " @@ -472,31 +499,14 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) - @_write_cli('orchestrator rbd-mirror rm', - "name=name,type=CephString,req=false", - 'Remove rbd-mirror service or rbd-mirror service instance') - def _rbd_mirror_rm(self, name=None): - completion = self.remove_rbd_mirror(name) - self._orchestrator_wait([completion]) - orchestrator.raise_if_exception(completion) - return HandleCommandResult(stdout=completion.result_str()) - - @_write_cli('orchestrator mds rm', - "name=name,type=CephString", - 'Remove an MDS service (mds id or fs_name)') - def _mds_rm(self, name): - completion = self.remove_mds(name) - self._orchestrator_wait([completion]) - orchestrator.raise_if_exception(completion) - return HandleCommandResult(stdout=completion.result_str()) - - @_write_cli('orchestrator rgw rm', - "name=name,type=CephString", - 'Remove an RGW service') - def _rgw_rm(self, name): - completion = self.remove_rgw(name) + @_write_cli('orchestrator nfs update', + "name=svc_id,type=CephString " + "name=num,type=CephInt", + 'Scale an NFS service') + def _nfs_update(self, svc_id, num): + spec = orchestrator.NFSServiceSpec(svc_id, count=num) + completion = self.update_nfs(spec) self._orchestrator_wait([completion]) - orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) @_write_cli('orchestrator nfs rm', @@ -508,16 +518,6 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) - @_write_cli('orchestrator nfs update', - "name=svc_id,type=CephString " - "name=num,type=CephInt", - 'Scale an NFS service') - def _nfs_update(self, svc_id, num): - spec = orchestrator.NFSServiceSpec(svc_id, count=num) - completion = self.update_nfs(spec) - self._orchestrator_wait([completion]) - return HandleCommandResult(stdout=completion.result_str()) - @_write_cli('orchestrator service', "name=action,type=CephChoices,strings=start|stop|reload|restart|redeploy " "name=svc_type,type=CephString " -- 2.39.5