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
This commit is contained in:
Ken'ichi Ohmichi 2017-03-17 09:55:55 -07:00 committed by Ken'ichi Ohmichi
parent 192e64e66b
commit 0f107bcdbe
3 changed files with 11 additions and 8 deletions

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The volume config option 'api_v3' default is changed to
``True`` because the volume v3 API is CURRENT.

View File

@ -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")
]

View File

@ -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():