Fix missing instance_ports_cache options
Also remove skipsdist to fix genconfig target in tox. Change-Id: I4320c98bd0cd20b4192caa5de32b0e79f097ccb1
This commit is contained in:
parent
9c92df8152
commit
6a016ff447
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,6 +18,20 @@ from oslo_cache import core
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
|
PORTS_CACHE_GROUP = cfg.OptGroup('instance_ports_cache')
|
||||||
|
PORTS_CACHE_OPTS = [
|
||||||
|
cfg.IntOpt('expiration_time', default=86400,
|
||||||
|
help='TTL, in seconds, for any cached item in the '
|
||||||
|
'dogpile.cache region used for caching of the '
|
||||||
|
'instance ports.'),
|
||||||
|
cfg.BoolOpt("caching", default=True,
|
||||||
|
help='Toggle to enable/disable caching when getting trove '
|
||||||
|
'instance ports. Please note that the global toggle '
|
||||||
|
'for oslo.cache(enabled=True in [cache] group) '
|
||||||
|
'must be enabled to use this feature.')
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def register_cache_configurations(conf):
|
def register_cache_configurations(conf):
|
||||||
"""Register all configurations required for oslo.cache.
|
"""Register all configurations required for oslo.cache.
|
||||||
|
|
||||||
@ -26,20 +40,8 @@ def register_cache_configurations(conf):
|
|||||||
"""
|
"""
|
||||||
core.configure(conf)
|
core.configure(conf)
|
||||||
|
|
||||||
ports_cache_group = cfg.OptGroup('instance_ports_cache')
|
conf.register_group(PORTS_CACHE_GROUP)
|
||||||
ports_cache_opts = [
|
conf.register_opts(PORTS_CACHE_OPTS, group=PORTS_CACHE_GROUP)
|
||||||
cfg.IntOpt('expiration_time', default=86400,
|
|
||||||
help='TTL, in seconds, for any cached item in the '
|
|
||||||
'dogpile.cache region used for caching of the '
|
|
||||||
'instance ports.'),
|
|
||||||
cfg.BoolOpt("caching", default=True,
|
|
||||||
help='Toggle to enable/disable caching when getting trove '
|
|
||||||
'instance ports. Please note that the global toggle '
|
|
||||||
'for oslo.cache(enabled=True in [cache] group) '
|
|
||||||
'must be enabled to use this feature.')
|
|
||||||
]
|
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user