"""Update existing a Node-Exporter daemon(s)"""
raise NotImplementedError()
+ def add_alertmanager(self, spec):
+ # type: (ServiceSpec) -> Completion
+ """Create a new AlertManager service"""
+ raise NotImplementedError()
+
+ def apply_alertmanager(self, spec):
+ # type: (ServiceSpec) -> Completion
+ """Update an existing AlertManager daemon(s)"""
+ raise NotImplementedError()
+
def upgrade_check(self, image, version):
# type: (Optional[str], Optional[str]) -> Completion
raise NotImplementedError()
self._orchestrator_wait([completion])
return HandleCommandResult(stdout=completion.result_str())
+ @_cli_write_command(
+ 'orch daemon add alertmanager',
+ 'name=num,type=CephInt,req=false '
+ 'name=hosts,type=CephString,n=N,req=false '
+ 'name=label,type=CephString,req=false',
+ 'Add alertmanager daemon(s)')
+ def _daemon_add_alertmanager(self, num=None, label=None, hosts=[]):
+ # type: (Optional[int], Optional[str], List[str]) -> HandleCommandResult
+ spec = ServiceSpec(
+ placement=PlacementSpec(label=label, hosts=hosts, count=num),
+ )
+ completion = self.add_alertmanager(spec)
+ self._orchestrator_wait([completion])
+ return HandleCommandResult(stdout=completion.result_str())
+
@_cli_write_command(
'orch',
"name=action,type=CephChoices,strings=start|stop|restart|redeploy|reconfig "