Fix missing instance_ports_cache options
Also remove skipsdist to fix genconfig target in tox. Change-Id: I4320c98bd0cd20b4192caa5de32b0e79f097ccb1
This commit is contained in:
1
tox.ini
1
tox.ini
@@ -1,7 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py3,pep8,cover,api-ref,releasenotes,bandit,fakemodetests
|
envlist = py3,pep8,cover,api-ref,releasenotes,bandit,fakemodetests
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
skipsdist = True
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
|||||||
@@ -18,16 +18,8 @@ from oslo_cache import core
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
def register_cache_configurations(conf):
|
PORTS_CACHE_GROUP = cfg.OptGroup('instance_ports_cache')
|
||||||
"""Register all configurations required for oslo.cache.
|
PORTS_CACHE_OPTS = [
|
||||||
|
|
||||||
The procedure registers all configurations required for oslo.cache.
|
|
||||||
It should be called before configuring of cache region
|
|
||||||
"""
|
|
||||||
core.configure(conf)
|
|
||||||
|
|
||||||
ports_cache_group = cfg.OptGroup('instance_ports_cache')
|
|
||||||
ports_cache_opts = [
|
|
||||||
cfg.IntOpt('expiration_time', default=86400,
|
cfg.IntOpt('expiration_time', default=86400,
|
||||||
help='TTL, in seconds, for any cached item in the '
|
help='TTL, in seconds, for any cached item in the '
|
||||||
'dogpile.cache region used for caching of the '
|
'dogpile.cache region used for caching of the '
|
||||||
@@ -38,8 +30,18 @@ def register_cache_configurations(conf):
|
|||||||
'for oslo.cache(enabled=True in [cache] group) '
|
'for oslo.cache(enabled=True in [cache] group) '
|
||||||
'must be enabled to use this feature.')
|
'must be enabled to use this feature.')
|
||||||
]
|
]
|
||||||
conf.register_group(ports_cache_group)
|
|
||||||
conf.register_opts(ports_cache_opts, group=ports_cache_group)
|
|
||||||
|
def register_cache_configurations(conf):
|
||||||
|
"""Register all configurations required for oslo.cache.
|
||||||
|
|
||||||
|
The procedure registers all configurations required for oslo.cache.
|
||||||
|
It should be called before configuring of cache region
|
||||||
|
"""
|
||||||
|
core.configure(conf)
|
||||||
|
|
||||||
|
conf.register_group(PORTS_CACHE_GROUP)
|
||||||
|
conf.register_opts(PORTS_CACHE_OPTS, group=PORTS_CACHE_GROUP)
|
||||||
|
|
||||||
return conf
|
return conf
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from oslo_log import versionutils
|
|||||||
from oslo_middleware import cors
|
from oslo_middleware import cors
|
||||||
from osprofiler import opts as profiler
|
from osprofiler import opts as profiler
|
||||||
|
|
||||||
|
from trove.common import cache
|
||||||
from trove.common.i18n import _
|
from trove.common.i18n import _
|
||||||
from trove.version import version_info as version
|
from trove.version import version_info as version
|
||||||
|
|
||||||
@@ -1611,6 +1612,7 @@ def list_opts():
|
|||||||
(network_group, network_opts),
|
(network_group, network_opts),
|
||||||
(service_credentials_group, service_credentials_opts),
|
(service_credentials_group, service_credentials_opts),
|
||||||
(guest_agent_group, guest_agent_opts),
|
(guest_agent_group, guest_agent_opts),
|
||||||
|
(cache.PORTS_CACHE_GROUP, cache.PORTS_CACHE_OPTS)
|
||||||
]
|
]
|
||||||
|
|
||||||
return keystone_middleware_opts + keystone_loading_opts + trove_opts
|
return keystone_middleware_opts + keystone_loading_opts + trove_opts
|
||||||
|
|||||||
Reference in New Issue
Block a user