From 0f107bcdbe56ce4b1bf7df5deb12e739d4e6f967 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Fri, 17 Mar 2017 09:55:55 -0700 Subject: [PATCH] Change Cinder api_v3 config True on default Cinder V3 API is CURRENT now (Pike). It is nice to set the corresponding config True for following current API status. Change-Id: I783feb76e67819fb5a9c609eb91c1442c87b640e --- ...t-cinder-api-v3-option-true-1b3e61e3129b7c00.yaml | 5 +++++ tempest/config.py | 2 +- tempest/tests/cmd/test_verify_tempest_config.py | 12 +++++------- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/set-cinder-api-v3-option-true-1b3e61e3129b7c00.yaml 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():