"""Update RGW cluster"""
raise NotImplementedError()
+ def add_prometheus(self, spec):
+ # type: (ServiceSpec) -> Completion
+ """Create new prometheus daemon"""
+ raise NotImplementedError()
+
+ def apply_prometheus(self, spec):
+ # type: (ServiceSpec) -> Completion
+ """Update prometheus cluster"""
+ raise NotImplementedError()
+
def upgrade_check(self, image, version):
# type: (Optional[str], Optional[str]) -> Completion
raise NotImplementedError()
orchestrator.raise_if_exception(completion)
return HandleCommandResult(stdout=completion.result_str())
+ @orchestrator._cli_write_command(
+ 'orch daemon add prometheus',
+ 'name=num,type=CephInt,req=false '
+ 'name=hosts,type=CephString,n=N,req=false '
+ 'name=label,type=CephString,req=false',
+ 'Add prometheus daemon(s)')
+ def _daemon_add_prometheus(self, num=None, label=None, hosts=[]):
+ # type: (Optional[int], Optional[str], List[str]) -> HandleCommandResult
+ spec = orchestrator.ServiceSpec(
+ placement=orchestrator.PlacementSpec(label=label, hosts=hosts, count=num),
+ )
+ completion = self.add_prometheus(spec)
+ self._orchestrator_wait([completion])
+ return HandleCommandResult(stdout=completion.result_str())
+
@orchestrator._cli_write_command(
'orch',
"name=action,type=CephChoices,strings=start|stop|restart|redeploy|reconfig "
self._orchestrator_wait([completion])
return HandleCommandResult(stdout=completion.result_str())
+ @orchestrator._cli_write_command(
+ 'orch apply prometheus',
+ 'name=num,type=CephInt,req=false '
+ 'name=hosts,type=CephString,n=N,req=false '
+ 'name=label,type=CephString,req=false',
+ 'Scale prometheus service')
+ def _apply_prometheus(self, num=None, label=None, hosts=[]):
+ # type: (Optional[int], Optional[str], List[str]) -> HandleCommandResult
+ spec = orchestrator.ServiceSpec(
+ placement=orchestrator.PlacementSpec(label=label, hosts=hosts, count=num),
+ )
+ completion = self.apply_prometheus(spec)
+ self._orchestrator_wait([completion])
+ return HandleCommandResult(stdout=completion.result_str())
+
@orchestrator._cli_write_command(
'orch set backend',
"name=module_name,type=CephString,req=true",