summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-05 15:56:43 +0000
committerGerrit Code Review <review@openstack.org>2017-01-05 15:56:43 +0000
commite303b99f20e3cf8ba4b7291935e5fa8c33092815 (patch)
tree61907615d8daf0d6e3fcaee28a7d80ef7c85a90b
parent705802ea5c41cc02f89fee15bcdf3280aa300149 (diff)
parent64b0b83174d090c0b76785d517a640f9a4b6c2bc (diff)
downloadoslo-middleware-e303b99f20e3cf8ba4b7291935e5fa8c33092815.tar.gz
Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()"
-rw-r--r--oslo_middleware/correlation_id.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_middleware/correlation_id.py b/oslo_middleware/correlation_id.py
index 773dcba..0892ccd 100644
--- a/oslo_middleware/correlation_id.py
+++ b/oslo_middleware/correlation_id.py
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import uuid
+from oslo_utils import uuidutils
from oslo_middleware import base
@@ -23,5 +23,5 @@ class CorrelationId(base.ConfigurableMiddleware):
def process_request(self, req):
correlation_id = (req.headers.get("X_CORRELATION_ID") or
- str(uuid.uuid4()))
+ uuidutils.generate_uuid())
req.headers['X_CORRELATION_ID'] = correlation_id