diff --git a/tests/unit/storage/test_impl_redis.py b/tests/unit/storage/test_impl_redis.py index a554591c4..7fa682f51 100644 --- a/tests/unit/storage/test_impl_redis.py +++ b/tests/unit/storage/test_impl_redis.py @@ -18,6 +18,7 @@ import uuid import mock from oslo_utils import timeutils +from oslo_utils import uuidutils import redis from zaqar.common import errors @@ -131,7 +132,7 @@ class RedisUtilsTest(testing.TestBase): msg = _create_sample_message() self.assertTrue(utils.msg_echo_filter(msg, msg.client_uuid)) - alt_uuid = utils.generate_uuid() + alt_uuid = uuidutils.generate_uuid() self.assertFalse(utils.msg_echo_filter(msg, alt_uuid)) def test_basic_message(self): diff --git a/zaqar/storage/redis/claims.py b/zaqar/storage/redis/claims.py index f52f0b92a..9e8b3aef7 100644 --- a/zaqar/storage/redis/claims.py +++ b/zaqar/storage/redis/claims.py @@ -16,6 +16,7 @@ import functools import msgpack from oslo_utils import timeutils +from oslo_utils import uuidutils from zaqar.common import decorators from zaqar.openstack.common import log as logging @@ -257,7 +258,7 @@ class ClaimController(storage.Claim, scripting.Mixin): claim_expires = now + claim_ttl msg_expires = claim_expires + grace - claim_id = utils.generate_uuid() + claim_id = uuidutils.generate_uuid() claimed_msgs = [] # NOTE(kgriffs): Claim some messages diff --git a/zaqar/storage/redis/utils.py b/zaqar/storage/redis/utils.py index dbf02c49e..7971e9b9b 100644 --- a/zaqar/storage/redis/utils.py +++ b/zaqar/storage/redis/utils.py @@ -15,7 +15,6 @@ import functools import sys import time -import uuid from oslo_utils import encodeutils import redis @@ -50,10 +49,6 @@ def normalize_none_str(string_or_none): return '' if string_or_none is None else string_or_none -def generate_uuid(): - return str(uuid.uuid4()) - - def scope_queue_name(queue=None, project=None): """Returns a scoped name for a queue based on project and queue.