diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 291b9a02641d..569f560ac154 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -95,31 +95,6 @@ class ServersController(wsgi.Controller): def __init__(self, **kwargs): def _check_load_extension(required_function): - def should_load_extension(ext): - # Check whitelist is either empty or if not then the extension - # is in the whitelist - whitelist = CONF.osapi_v21.extensions_whitelist - blacklist = CONF.osapi_v21.extensions_blacklist - if not whitelist: - # if there is no whitelist, we accept everything, - # so we only care about the blacklist. - if ext.obj.alias in blacklist: - return False - else: - return True - else: - if ext.obj.alias in whitelist: - if ext.obj.alias in blacklist: - LOG.warning( - "Extension %s is both in whitelist and " - "blacklist, blacklisting takes precedence", - ext.obj.alias) - return False - else: - return True - else: - return False - def check_load_extension(ext): if isinstance(ext.obj, extensions.V21APIExtensionBase): # Filter out for the existence of the required @@ -133,7 +108,7 @@ class ServersController(wsgi.Controller): 'servers extension for function %(func)s', {'ext_alias': ext.obj.alias, 'func': required_function}) - return should_load_extension(ext) + return True else: LOG.debug( 'extension %(ext_alias)s is missing %(func)s', diff --git a/nova/conf/osapi_v21.py b/nova/conf/osapi_v21.py index d3ee8ac95b2f..6e1b7146e1c1 100644 --- a/nova/conf/osapi_v21.py +++ b/nova/conf/osapi_v21.py @@ -18,49 +18,6 @@ from oslo_config import cfg api_opts_group = cfg.OptGroup(name="osapi_v21", title="API v2.1 Options") api_opts = [ - cfg.ListOpt("extensions_blacklist", - default=[], - deprecated_for_removal=True, - deprecated_since="12.0.0", - deprecated_reason=""" -API extensions are now part of the standard API. API extensions should be -disabled using policy, rather than via these configuration options.""", - help=""" -This option is a list of all of the v2.1 API extensions to never load. - -Possible values: - -* A list of strings, each being the alias of an extension that you do not - wish to load. - -Related options: - -* enabled -* extensions_whitelist -"""), - cfg.ListOpt("extensions_whitelist", - default=[], - deprecated_for_removal=True, - deprecated_since="12.0.0", - deprecated_reason=""" -API extensions are now part of the standard API. API extensions should be -disabled using policy, rather than via these configuration options.""", - help=""" -This is a list of extensions. If it is empty, then *all* extensions except -those specified in the extensions_blacklist option will be loaded. If it is not -empty, then only those extensions in this list will be loaded, provided that -they are also not in the extensions_blacklist option. - -Possible values: - -* A list of strings, each being the alias of an extension that you wish to - load, or an empty list, which indicates that all extensions are to be run. - -Related options: - -* enabled -* extensions_blacklist -"""), cfg.StrOpt("project_id_regex", deprecated_for_removal=True, deprecated_since="13.0.0", diff --git a/releasenotes/notes/remove-deprecated-extensions-enable-config-options-d6b3d62a6cc1cbe5.yaml b/releasenotes/notes/remove-deprecated-extensions-enable-config-options-d6b3d62a6cc1cbe5.yaml new file mode 100644 index 000000000000..17829e075018 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-extensions-enable-config-options-d6b3d62a6cc1cbe5.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Deprecated config options to enable/disable extensions + ``extensions_blacklist`` and ``extensions_whitelist`` have been removed. + This means all API extensions are always enabled. If you modifed policy, + please double check you have the correct policy settings for all APIs. \ No newline at end of file