diff --git a/requirements.txt b/requirements.txt index c69d12e97..53190d185 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ munch decorator jsonpatch ipaddress -os-client-config>=1.9.0 +os-client-config>=1.10.1 requestsexceptions>=1.1.1 six diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index 0dc62435b..c554fa3b9 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -173,7 +173,6 @@ class OpenStackCloud(object): cache_expiration_time = int(cloud_config.get_cache_expiration_time()) cache_class = cloud_config.get_cache_class() cache_arguments = cloud_config.get_cache_arguments() - cache_expiration = cloud_config.get_cache_expiration() if cache_class != 'dogpile.cache.null': self._cache = cache.make_region( @@ -209,7 +208,7 @@ class OpenStackCloud(object): # If server expiration time is set explicitly, use that. Otherwise # fall back to whatever it was before - self._SERVER_LIST_AGE = cache_expiration.get( + self._SERVER_LIST_AGE = cloud_config.get_cache_resource_expiration( 'server', self._SERVER_LIST_AGE) self._container_cache = dict() diff --git a/shade/tests/unit/test_caching.py b/shade/tests/unit/test_caching.py index 5715b7132..a637c7994 100644 --- a/shade/tests/unit/test_caching.py +++ b/shade/tests/unit/test_caching.py @@ -33,6 +33,9 @@ class TestMemoryCache(base.TestCase): { 'max_age': 90, 'class': 'dogpile.cache.memory', + 'expiration': { + 'server': 1, + }, }, 'clouds': {