Merge "Remove 'enable_v3_api' option"
This commit is contained in:
commit
bfb89b652c
@ -26,12 +26,12 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
def root_app_factory(loader, global_conf, **local_conf):
|
||||
# To support upgrades from previous api-paste config files, we need
|
||||
# to check for and remove any legacy references to the v1 API
|
||||
# to check for and remove any legacy references to the v1 or v2 API
|
||||
if '/v1' in local_conf:
|
||||
LOG.warning('The v1 API has been removed and is no longer '
|
||||
'available. Client applications should be '
|
||||
'using v3. Ensure enable_v3_api=true in your '
|
||||
'cinder.conf file.')
|
||||
'using v3, which is currently the only supported '
|
||||
'version of the Block Storage API.')
|
||||
del local_conf['/v1']
|
||||
|
||||
if '/v2' in local_conf:
|
||||
|
@ -98,11 +98,6 @@ class VersionsController(wsgi.Controller):
|
||||
builder = views_versions.get_view_builder(req)
|
||||
known_versions = copy.deepcopy(_KNOWN_VERSIONS)
|
||||
|
||||
# FIXME: remove this in Y ... I suppose we should honor
|
||||
# it in Xena, even though it doesn't make any sense
|
||||
if not CONF.enable_v3_api:
|
||||
known_versions.pop('v3.0')
|
||||
|
||||
return builder.build_versions(known_versions)
|
||||
|
||||
|
||||
|
@ -47,13 +47,6 @@ core_opts = [
|
||||
CONF.register_cli_opts(core_opts)
|
||||
|
||||
api_opts = [
|
||||
cfg.BoolOpt('enable_v3_api',
|
||||
default=True,
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason=('This is the only API version available, '
|
||||
'so disabling it is not an option.'),
|
||||
deprecated_since="Xena",
|
||||
help="Deploy v3 of the Cinder API."),
|
||||
cfg.BoolOpt('api_rate_limit',
|
||||
default=True,
|
||||
help='Enables or disables rate limit of the API.'),
|
||||
|
@ -16,7 +16,6 @@ from http import HTTPStatus
|
||||
|
||||
import ddt
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import encodeutils
|
||||
import webob
|
||||
@ -79,16 +78,6 @@ class VersionsControllerTestCase(test.TestCase):
|
||||
self.assertEqual(api_version_request._MIN_API_VERSION,
|
||||
v3.get('min_version'))
|
||||
|
||||
def test_all_versions_excludes_disabled(self):
|
||||
version = '3.0'
|
||||
self.fixture = self.useFixture(config_fixture.Config(CONF))
|
||||
self.fixture.config(enable_v3_api=False)
|
||||
vc = versions.VersionsController()
|
||||
req = self.build_request(base_url='http://localhost')
|
||||
resp = vc.all(req)
|
||||
all_versions = [x['id'] for x in resp['versions']]
|
||||
self.assertNotIn('v' + version, all_versions)
|
||||
|
||||
def test_versions(self):
|
||||
version = '3.0'
|
||||
req = self.build_request(
|
||||
|
@ -7,8 +7,8 @@ upgrade:
|
||||
to remove all references to v2. Additionally, the deprecated
|
||||
configuration option ``enable_v2_api`` has been removed. If present
|
||||
in a configuration file, it will be silently ignored.
|
||||
deprecations:
|
||||
- |
|
||||
The configuration option ``enable_v3_api`` is deprecated in this
|
||||
release due to the fact that v3 is the only version of the Block
|
||||
Storage API available. It will be removed in the next release.
|
||||
|
||||
The configuration option ``enable_v3_api`` has been removed from this
|
||||
release due to the fact that v3 is now the only version of the Block
|
||||
Storage API available. If present in a configuration file, it will
|
||||
be silently ignored as the v3 API is now enabled unconditionally.
|
||||
|
Loading…
Reference in New Issue
Block a user