Helpers for comparing version strings.
"""
+import copy
import functools
import inspect
import logging
-from oslo.config import cfg
+from oslo_config import cfg
import pkg_resources
import six
CONF = cfg.CONF
-opts = [
+deprecated_opts = [
cfg.BoolOpt('fatal_deprecations',
default=False,
help='Enables or disables fatal status of deprecations.'),
]
+def list_opts():
+ """Entry point for oslo.config-generator.
+ """
+ return [(None, copy.deepcopy(deprecated_opts))]
+
+
class deprecated(object):
"""A decorator to mark callables as deprecated.
ICEHOUSE = 'I'
JUNO = 'J'
KILO = 'K'
+ LIBERTY = 'L'
_RELEASES = {
# NOTE(morganfainberg): Bexar is used for unit test purposes, it is
'I': 'Icehouse',
'J': 'Juno',
'K': 'Kilo',
+ 'L': 'Liberty',
}
_deprecated_msg_with_alternative = _(
fatal deprecations.
"""
stdmsg = _("Deprecated: %s") % msg
- CONF.register_opts(opts)
+ CONF.register_opts(deprecated_opts)
if CONF.fatal_deprecations:
logger.critical(stdmsg, *args, **kwargs)
raise DeprecatedConfig(msg=stdmsg)