From 7d546fe89bccaf19885658b546332090c347974c Mon Sep 17 00:00:00 2001 From: kgriffs Date: Tue, 2 Sep 2014 12:27:59 -0500 Subject: [PATCH] Switch Redis driver modules over to oslo.utils.timeutils This patch changes the Redis drivers so they use the oslo.utils version of timeutils. This is consistent with the rest of Zaqar. Change-Id: I56379b90414cbd8bcc6bca6998988dba800693b9 Partially-Implements: blueprint redis-storage-driver --- tests/unit/queues/storage/test_impl_redis.py | 4 ++-- zaqar/queues/storage/redis/claims.py | 2 +- zaqar/queues/storage/redis/messages.py | 2 +- zaqar/queues/storage/redis/models.py | 2 +- zaqar/queues/storage/redis/queues.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/queues/storage/test_impl_redis.py b/tests/unit/queues/storage/test_impl_redis.py index b9dfaceb5..ec4dc4f30 100644 --- a/tests/unit/queues/storage/test_impl_redis.py +++ b/tests/unit/queues/storage/test_impl_redis.py @@ -17,10 +17,10 @@ import time import uuid import mock +from oslo.utils import timeutils import redis from zaqar.openstack.common.cache import cache as oslo_cache -from zaqar.openstack.common import timeutils from zaqar.queues import storage from zaqar.queues.storage.redis import controllers from zaqar.queues.storage.redis import driver @@ -292,7 +292,7 @@ class RedisClaimsTest(base.ClaimControllerTest): client_uuid=str(uuid.uuid4())) now = timeutils.utcnow_ts() - timeutils_utcnow = 'zaqar.openstack.common.timeutils.utcnow_ts' + timeutils_utcnow = 'oslo.utils.timeutils.utcnow_ts' # Test a single claim with mock.patch(timeutils_utcnow) as mock_utcnow: diff --git a/zaqar/queues/storage/redis/claims.py b/zaqar/queues/storage/redis/claims.py index d590bf0e1..6da97e804 100644 --- a/zaqar/queues/storage/redis/claims.py +++ b/zaqar/queues/storage/redis/claims.py @@ -15,11 +15,11 @@ import functools import msgpack +from oslo.utils import timeutils import redis from zaqar.common import decorators from zaqar.openstack.common import log as logging -from zaqar.openstack.common import timeutils from zaqar.queues import storage from zaqar.queues.storage import errors from zaqar.queues.storage.redis import messages diff --git a/zaqar/queues/storage/redis/messages.py b/zaqar/queues/storage/redis/messages.py index 8ef98cca4..32caf793f 100644 --- a/zaqar/queues/storage/redis/messages.py +++ b/zaqar/queues/storage/redis/messages.py @@ -15,11 +15,11 @@ import functools import uuid +from oslo.utils import timeutils import redis from zaqar.common import decorators from zaqar.openstack.common import strutils -from zaqar.openstack.common import timeutils from zaqar.queues import storage from zaqar.queues.storage import errors from zaqar.queues.storage.redis import models diff --git a/zaqar/queues/storage/redis/models.py b/zaqar/queues/storage/redis/models.py index a4f90eb8d..98aaaa934 100644 --- a/zaqar/queues/storage/redis/models.py +++ b/zaqar/queues/storage/redis/models.py @@ -16,9 +16,9 @@ import functools import uuid import msgpack +from oslo.utils import timeutils from zaqar.openstack.common import strutils -from zaqar.openstack.common import timeutils _pack = msgpack.Packer(encoding='utf-8', use_bin_type=True).pack diff --git a/zaqar/queues/storage/redis/queues.py b/zaqar/queues/storage/redis/queues.py index e316e4635..95f7376c6 100644 --- a/zaqar/queues/storage/redis/queues.py +++ b/zaqar/queues/storage/redis/queues.py @@ -15,11 +15,11 @@ import functools import msgpack +from oslo.utils import timeutils import redis from zaqar.common import decorators from zaqar.openstack.common import log as logging -from zaqar.openstack.common import timeutils from zaqar.queues import storage from zaqar.queues.storage import errors from zaqar.queues.storage.redis import utils