Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
python3-dmapi / usr / lib / python3.6 / site-packages / dmapi / api / dm_req_id.py
Size: Mime:
# Copyright 2018 TrilioData Inc.
# All Rights Reserved.

"""Middleware that ensures x-dm-request-id

Dmapi's notion of request-id tracking predates any common idea, so the
original version of this header in OpenStack was
x-dm-request-id. Eventually we got oslo, and all other projects
implemented this with x-openstack-request-id.

However, x-dm-request-id was always part of our contract. The
following migrates us to use x-openstack-request-id as well, by using
the common middleware.

"""

from oslo_middleware import request_id


HTTP_RESP_HEADER_REQUEST_ID = 'x-dm-request-id'


class DmapiReqIdMiddleware(request_id.RequestId):
    compat_headers = [HTTP_RESP_HEADER_REQUEST_ID]