Beispiel #1
0
def do_service_restart(service_name, result_defer, wait_timeout):
    if _Debug:
        lg.args(_DebugLevel, service_name=service_name)
    d = api.service_restart(service_name, wait_timeout=wait_timeout)
    d.addCallback(on_service_restarted, service_name, result_defer,
                  wait_timeout)
    d.addErrback(lambda err: result_defer.callback(
        dict(
            error=err,
            reason='{}_restart_error'.format(service_name),
        )))
    return None
 def jsonrpc_service_restart(self, service_name, wait_timeout=10):
     return api.service_restart(service_name, wait_timeout=wait_timeout)
Beispiel #3
0
 def service_restart_v1(self, request, service_name):
     return api.service_restart(service_name,
                                wait_timeout=_request_data(request).get(
                                    'wait_timeout', 10))