Set CONF.image_feature_enabled.api_v1 default to False
Glance v1 APIs are deprecated and v2 APIs are current one, but CONF.image_feature_enabled.api_v1 now defaults to True, so CONF.image_feature_enabled.api_v1 must be explicitly set to False in tempest.conf to avoid using api_v1, which is annoying. So this is to set CONF.image_feature_enabled.api_v1 default to False. Change-Id: Iab3a209c744375bf2618afc00a3f7731b62f557e
This commit is contained in:
parent
e18f7e6466
commit
dc68af740b
@ -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.
|
@ -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 '
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user