From da506ac59a73addde661195d8f8aca3778221d01 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 Mar 2020 07:34:14 -0600 Subject: [PATCH] mgr/orch: add apply alertmanager to CLI Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator/module.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 27688033161..6c4845f6b94 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -857,6 +857,19 @@ Usage: self._orchestrator_wait([completion]) return HandleCommandResult(stdout=completion.result_str()) + @_cli_write_command( + 'orch apply alertmanager', + 'name=placement,type=CephString,n=N,req=false', + 'Scale alertmanager service') + def _apply_alertmanager(self, placement=None): + spec = ServiceSpec( + 'alertmanager', + placement=PlacementSpec.from_strings(placement), + ) + completion = self.apply_alertmanager(spec) + self._orchestrator_wait([completion]) + return HandleCommandResult(stdout=completion.result_str()) + @_cli_write_command( 'orch apply node-exporter', 'name=placement,type=CephString,n=N,req=false', -- 2.39.5