Merge "Set CONF.image_feature_enabled.api_v1 default to False"

This commit is contained in:
Zuul 2018-09-13 19:53:10 +00:00 committed by Gerrit Code Review
commit 3674fb1382
3 changed files with 13 additions and 7 deletions

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Changed the default value of 'api_v1' config option in the
'image-feature-enabled' group to False from True, because
glance v1 APIs are deprecated. Please set True explicitly
on the option if still testing glance v1 APIs.

View File

@ -547,7 +547,7 @@ ImageFeaturesGroup = [
'test v2 APIs only so this config option '
'will be removed.'),
cfg.BoolOpt('api_v1',
default=True,
default=False,
help="Is the v1 image API enabled",
deprecated_for_removal=True,
deprecated_reason='Glance v1 APIs are deprecated and v2 APIs '

View File

@ -234,8 +234,8 @@ class TestDiscovery(base.TestCase):
with mock.patch.object(verify_tempest_config,
'print_and_or_update') as print_mock:
verify_tempest_config.verify_glance_api_versions(fake_os, True)
print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
False, True)
print_mock.assert_called_with('api_v2', 'image-feature-enabled',
False, True)
def test_verify_glance_version_no_v2_with_v1_0(self):
# This test verifies that wrong config api_v2 = True is detected
@ -250,8 +250,8 @@ class TestDiscovery(base.TestCase):
with mock.patch.object(verify_tempest_config,
'print_and_or_update') as print_mock:
verify_tempest_config.verify_glance_api_versions(fake_os, True)
print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
False, True)
print_mock.assert_called_with('api_v2', 'image-feature-enabled',
False, True)
def test_verify_glance_version_no_v1(self):
# This test verifies that wrong config api_v1 = True is detected
@ -271,8 +271,7 @@ class TestDiscovery(base.TestCase):
with mock.patch.object(verify_tempest_config,
'print_and_or_update') as print_mock:
verify_tempest_config.verify_glance_api_versions(fake_os, True)
print_mock.assert_called_once_with('api_v1', 'image-feature-enabled',
False, True)
print_mock.assert_not_called()
def test_verify_glance_version_no_version(self):
# This test verifies that wrong config api_v1 = True is detected