:param service_id: service daemon instance (usually a short hostname)
:rtype: WriteCompletion
"""
- assert action in ["start", "stop", "reload"]
+ assert action in ["start", "stop", "reload", "restart", "redeploy"]
assert service_name or service_id
assert not (service_name and service_id)
raise NotImplementedError()
from mgr_module import MgrModule
import orchestrator
+from orchestrator import OrchestratorError
from . import remotes
self._service_action, (d.service_type, d.service_instance,
d.nodename, action)))
if not results:
- n = service_name
- if n:
- n += '-*'
- raise OrchestratorError('Unable to find %s.%s%s daemon(s)' % (
- service_type, service_id, n))
+ if service_name:
+ n = service_name + '-*'
+ else:
+ n = service_id
+ raise OrchestratorError(
+ 'Unable to find %s.%s daemon(s)' % (
+ service_type, n))
return SSHWriteCompletion(results)
def _service_action(self, service_type, service_id, host, action):