diff --git a/releasenotes/notes/set-cinder-api-v3-option-true-1b3e61e3129b7c00.yaml b/releasenotes/notes/set-cinder-api-v3-option-true-1b3e61e3129b7c00.yaml new file mode 100644 index 0000000000..6959ca7da2 --- /dev/null +++ b/releasenotes/notes/set-cinder-api-v3-option-true-1b3e61e3129b7c00.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The volume config option 'api_v3' default is changed to + ``True`` because the volume v3 API is CURRENT. diff --git a/tempest/config.py b/tempest/config.py index f5b2f0dff3..c694dc5d7f 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -821,7 +821,7 @@ VolumeFeaturesGroup = [ default=True, help="Is the v2 volume API enabled"), cfg.BoolOpt('api_v3', - default=False, + default=True, help="Is the v3 volume API enabled") ] diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py index 98bf1453b5..36062e7a16 100644 --- a/tempest/tests/cmd/test_verify_tempest_config.py +++ b/tempest/tests/cmd/test_verify_tempest_config.py @@ -199,7 +199,9 @@ class TestDiscovery(base.TestCase): with mock.patch.object(verify_tempest_config, 'print_and_or_update') as print_mock: verify_tempest_config.verify_cinder_api_versions(fake_os, True) - print_mock.assert_not_called() + print_mock.assert_any_call('api_v3', 'volume-feature-enabled', + False, True) + self.assertEqual(1, print_mock.call_count) @mock.patch('tempest.lib.common.http.ClosingHttp.request') def test_verify_cinder_api_versions_no_v2(self, mock_request): @@ -215,9 +217,7 @@ class TestDiscovery(base.TestCase): verify_tempest_config.verify_cinder_api_versions(fake_os, True) print_mock.assert_any_call('api_v2', 'volume-feature-enabled', False, True) - print_mock.assert_any_call('api_v3', 'volume-feature-enabled', - True, True) - self.assertEqual(2, print_mock.call_count) + self.assertEqual(1, print_mock.call_count) @mock.patch('tempest.lib.common.http.ClosingHttp.request') def test_verify_cinder_api_versions_no_v1(self, mock_request): @@ -231,9 +231,7 @@ class TestDiscovery(base.TestCase): with mock.patch.object(verify_tempest_config, 'print_and_or_update') as print_mock: verify_tempest_config.verify_cinder_api_versions(fake_os, True) - print_mock.assert_any_call('api_v3', 'volume-feature-enabled', - True, True) - self.assertEqual(1, print_mock.call_count) + print_mock.assert_not_called() def test_verify_glance_version_no_v2_with_v1_1(self): def fake_get_versions():