Pull server list cache setting via API
To ensure that we get numbers and not strings from OCC for cache settings, we need to use the actual API for that, not direct data introspection. Change-Id: I457c624ebfcda6578417fb977ea3742a63507344
This commit is contained in:
parent
a71db08bc7
commit
2713168dd1
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -33,6 +33,9 @@ class TestMemoryCache(base.TestCase):
|
|||
{
|
||||
'max_age': 90,
|
||||
'class': 'dogpile.cache.memory',
|
||||
'expiration': {
|
||||
'server': 1,
|
||||
},
|
||||
},
|
||||
'clouds':
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue