Merge "Fix constants of config sections names in verify_*_api_versions."
This commit is contained in:
commit
1b1649ded8
@ -65,10 +65,10 @@ def verify_glance_api_versions(os, update):
|
||||
# Check glance api versions
|
||||
_, versions = os.image_client.get_versions()
|
||||
if CONF.image_feature_enabled.api_v1 != contains_version('v1.', versions):
|
||||
print_and_or_update('api_v1', 'image_feature_enabled',
|
||||
print_and_or_update('api_v1', 'image-feature-enabled',
|
||||
not CONF.image_feature_enabled.api_v1, update)
|
||||
if CONF.image_feature_enabled.api_v2 != contains_version('v2.', versions):
|
||||
print_and_or_update('api_v2', 'image_feature_enabled',
|
||||
print_and_or_update('api_v2', 'image-feature-enabled',
|
||||
not CONF.image_feature_enabled.api_v2, update)
|
||||
|
||||
|
||||
@ -105,11 +105,11 @@ def verify_keystone_api_versions(os, update):
|
||||
versions = _get_api_versions(os, 'keystone')
|
||||
if (CONF.identity_feature_enabled.api_v2 !=
|
||||
contains_version('v2.', versions)):
|
||||
print_and_or_update('api_v2', 'identity_feature_enabled',
|
||||
print_and_or_update('api_v2', 'identity-feature-enabled',
|
||||
not CONF.identity_feature_enabled.api_v2, update)
|
||||
if (CONF.identity_feature_enabled.api_v3 !=
|
||||
contains_version('v3.', versions)):
|
||||
print_and_or_update('api_v3', 'identity_feature_enabled',
|
||||
print_and_or_update('api_v3', 'identity-feature-enabled',
|
||||
not CONF.identity_feature_enabled.api_v3, update)
|
||||
|
||||
|
||||
@ -118,11 +118,11 @@ def verify_cinder_api_versions(os, update):
|
||||
versions = _get_api_versions(os, 'cinder')
|
||||
if (CONF.volume_feature_enabled.api_v1 !=
|
||||
contains_version('v1.', versions)):
|
||||
print_and_or_update('api_v1', 'volume_feature_enabled',
|
||||
print_and_or_update('api_v1', 'volume-feature-enabled',
|
||||
not CONF.volume_feature_enabled.api_v1, update)
|
||||
if (CONF.volume_feature_enabled.api_v2 !=
|
||||
contains_version('v2.', versions)):
|
||||
print_and_or_update('api_v2', 'volume_feature_enabled',
|
||||
print_and_or_update('api_v2', 'volume-feature-enabled',
|
||||
not CONF.volume_feature_enabled.api_v2, update)
|
||||
|
||||
|
||||
|
@ -113,7 +113,7 @@ class TestDiscovery(base.TestCase):
|
||||
'print_and_or_update') as print_mock:
|
||||
verify_tempest_config.verify_keystone_api_versions(fake_os, True)
|
||||
print_mock.assert_called_once_with('api_v3',
|
||||
'identity_feature_enabled',
|
||||
'identity-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_keystone_api_versions_no_v2(self):
|
||||
@ -129,7 +129,7 @@ class TestDiscovery(base.TestCase):
|
||||
'print_and_or_update') as print_mock:
|
||||
verify_tempest_config.verify_keystone_api_versions(fake_os, True)
|
||||
print_mock.assert_called_once_with('api_v2',
|
||||
'identity_feature_enabled',
|
||||
'identity-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_cinder_api_versions_no_v2(self):
|
||||
@ -144,7 +144,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_called_once_with('api_v2', 'volume_feature_enabled',
|
||||
print_mock.assert_called_once_with('api_v2', 'volume-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_cinder_api_versions_no_v1(self):
|
||||
@ -159,7 +159,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_called_once_with('api_v1', 'volume_feature_enabled',
|
||||
print_mock.assert_called_once_with('api_v1', 'volume-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_glance_version_no_v2_with_v1_1(self):
|
||||
@ -170,7 +170,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_v2', 'image_feature_enabled',
|
||||
print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_glance_version_no_v2_with_v1_0(self):
|
||||
@ -181,7 +181,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_v2', 'image_feature_enabled',
|
||||
print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_glance_version_no_v1(self):
|
||||
@ -192,7 +192,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',
|
||||
print_mock.assert_called_once_with('api_v1', 'image-feature-enabled',
|
||||
False, True)
|
||||
|
||||
def test_verify_extensions_neutron(self):
|
||||
|
Loading…
Reference in New Issue
Block a user