'Implement the processing stack.'

def _process_stack(self, request, action, action_args, content_type, body, accept):

    try:
        (meth, extensions) = self.get_method(request, action, content_type, body)
    except (AttributeError, TypeError):
        return Fault(webob.exc.HTTPNotFound())
    except KeyError as ex:
        msg = (_('There    is    no    such    action:    %s') % ex.args[0])
        return Fault(webob.exc.HTTPBadRequest(explanation=msg))
    except exception.MalformedRequestBody:
        msg = _('Malformed    request    body')
        return Fault(webob.exc.HTTPBadRequest(explanation=msg))
    if body:
        decoded_body = encodeutils.safe_decode(body, errors='ignore')
        msg = ("Action:    '%(action)s',    calling    method:    %(meth)s,    body:    %(body)s" % {'action': action, 'body': six.text_type(decoded_body), 'meth': six.text_type(meth)})
        LOG.debug(strutils.mask_password(msg))
    else:
        LOG.debug("Calling    method    '%(meth)s'", {'meth': six.text_type(meth)})
    try:
        if content_type:
            contents = self.deserialize(meth, content_type, body)
        else:
            contents = {}
    except exception.InvalidContentType:
        msg = _('Unsupported    Content-Type')
        return Fault(webob.exc.HTTPBadRequest(explanation=msg))
    except exception.MalformedRequestBody:
        msg = _('Malformed    request    body')
        return Fault(webob.exc.HTTPBadRequest(explanation=msg))
    action_args.update(contents)
    project_id = action_args.pop('project_id', None)
    context = request.environ.get('cinder.context')
    if (context and project_id and (project_id != context.project_id)):
        msg = _('Malformed    request    url')
        return Fault(webob.exc.HTTPBadRequest(explanation=msg))
    (response, post) = self.pre_process_extensions(extensions, request, action_args)
    if (not response):
        try:
            with ResourceExceptionHandler():
                action_result = self.dispatch(meth, request, action_args)
        except Fault as ex:
            response = ex
    if (not response):
        resp_obj = None
        if (isinstance(action_result, dict) or (action_result is None)):
            resp_obj = ResponseObject(action_result)
        elif isinstance(action_result, ResponseObject):
            resp_obj = action_result
        else:
            response = action_result
        if resp_obj:
            _set_request_id_header(request, resp_obj)
            serializers = getattr(meth, 'wsgi_serializers', {})
            resp_obj._bind_method_serializers(serializers)
            if hasattr(meth, 'wsgi_code'):
                resp_obj._default_code = meth.wsgi_code
            resp_obj.preserialize(accept, self.default_serializers)
            response = self.post_process_extensions(post, resp_obj, request, action_args)
        if (resp_obj and (not response)):
            response = resp_obj.serialize(request, accept, self.default_serializers)
    try:
        msg_dict = dict(url=request.url, status=response.status_int)
        msg = '%(url)s    returned    with    HTTP    %(status)d'
    except AttributeError as e:
        msg_dict = dict(url=request.url, e=e)
        msg = '%(url)s    returned    a    fault:    %(e)s'
    LOG.info(msg, msg_dict)
    if hasattr(response, 'headers'):
        for (hdr, val) in response.headers.items():
            val = utils.convert_str(val)
            response.headers[hdr] = val
        if (request.api_version_request and (not _is_legacy_endpoint(request))):
            response.headers[API_VERSION_REQUEST_HEADER] = ((VOLUME_SERVICE + '    ') + request.api_version_request.get_string())
            response.headers['Vary'] = API_VERSION_REQUEST_HEADER
    return response
