Merge "Use generate_uuid() from oslo.utils"
This commit is contained in:
commit
bb06ad70e6
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user