@webob.dec.wsgify(RequestClass=Request)
    def __call__(self, request):
        """WSGI method that controls (de)serialization and method dispatch."""

        LOG.info(_LI("%(method)s %(url)s"),
                 {"method": request.method, "url": request.url})

        try:
            action, args, accept = self.deserializer.deserialize(request)
        except exception.InvalidContentType:
            msg = _("Unsupported Content-Type")
            LOG.exception(_LE("InvalidContentType: %s"), msg)
            return Fault(webob.exc.HTTPBadRequest(explanation=msg))
        except n_exc.MalformedRequestBody:
            msg = _("Malformed request body")
            LOG.exception(_LE("MalformedRequestBody: %s"), msg)
            return Fault(webob.exc.HTTPBadRequest(explanation=msg))

        try:
            action_result = self.dispatch(request, action, args)
        except webob.exc.HTTPException as ex:
            LOG.info(_LI("HTTP exception thrown: %s"), ex)
            action_result = Fault(ex, self._fault_body_function)
        except Exception:
            LOG.exception(_LE("Internal error"))
            # Do not include the traceback to avoid returning it to clients.
            action_result = Fault(webob.exc.HTTPServerError(),
                                  self._fault_body_function)

        if isinstance(action_result, dict) or action_result is None:
            response = self.serializer.serialize(action_result,
                                                 accept,
                                                 action=action)
        else:
            response = action_result

        try:
            LOG.info(_LI("%(url)s returned with HTTP %(status)d"),
                     dict(url=request.url, status=response.status_int))
        except __HOLE__ as e:
            LOG.info(_LI("%(url)s returned a fault: %(exception)s"),
                     dict(url=request.url, exception=e))

        return response
dataset/ETHPy150Open openstack/neutron/neutron/wsgi.py/Resource.__call__