'Perform service update
Starting with microversion 2.53, the service uuid is passed in on the
path of the request to uniquely identify the service record on which to
perform a given update, which is defined in the body of the request.'

@wsgi.Controller.api_version(UUID_FOR_ID_MIN_VERSION)
@extensions.expected_errors((400, 404))
@validation.schema(services.service_update_v2_53, UUID_FOR_ID_MIN_VERSION)
def update(self, req, id, body):

    service_id = id
    if (not uuidutils.is_uuid_like(service_id)):
        msg = (_('Invalid    uuid    %s') % service_id)
        raise webob.exc.HTTPBadRequest(explanation=msg)
    context = req.environ['nova.context']
    context.can(services_policies.BASE_POLICY_NAME)
    try:
        service = self.host_api.service_get_by_id(context, service_id)
    except exception.ServiceNotFound as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
    if (service.binary != 'nova-compute'):
        msg = (_('Updating    a    %(binary)s    service    is    not    supported.    Only    nova-compute    services    can    be    updated.') % {'binary': service.binary})
        raise webob.exc.HTTPBadRequest(explanation=msg)
    if ('status' in body):
        if (body['status'] == 'enabled'):
            if body.get('disabled_reason'):
                msg = _("Specifying    'disabled_reason'    with    status    'enabled'    is    invalid.")
                raise webob.exc.HTTPBadRequest(explanation=msg)
            service.disabled = False
            service.disabled_reason = None
        elif (body['status'] == 'disabled'):
            service.disabled = True
            service.disabled_reason = body.get('disabled_reason')
    if ('forced_down' in body):
        service.forced_down = strutils.bool_from_string(body['forced_down'], strict=True)
    if (not service.obj_what_changed()):
        msg = _("No    updates    were    requested.    Fields    'status'    or    'forced_down'    should    be    specified.")
        raise webob.exc.HTTPBadRequest(explanation=msg)
    service.save()
    additional_fields = ['forced_down']
    return {'service': self._get_service_detail(service, additional_fields, req)}
