Add api version detection to verify_tempest_config
This commit adds glance api version discovery to verify_tempest_config.py. It will query the glance API to see which API versions are available and then compare that to what is in the config, pointing out any differences Partially Implements: blueprint config-verification Change-Id: Ie75f7f526d78b85a53ea4b0484e670d373d622ec
This commit is contained in:
parent
1f7b33d908
commit
99afd07524
@ -31,6 +31,18 @@ NOVA_EXTENSIONS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def verify_glance_api_versions(os):
|
||||||
|
# Check glance api versions
|
||||||
|
__, versions = os.image_client.get_versions()
|
||||||
|
if CONF.image_feature_enabled.api_v1 != ('v1.1' in versions or 'v1.0' in
|
||||||
|
versions):
|
||||||
|
print 'Config option image api_v1 should be change to: %s' % (
|
||||||
|
not CONF.image_feature_enabled.api_v1)
|
||||||
|
if CONF.image_feature_enabled.api_v2 != ('v2.0' in versions):
|
||||||
|
print 'Config option image api_v2 should be change to: %s' % (
|
||||||
|
not CONF.image_feature_enabled.api_v2)
|
||||||
|
|
||||||
|
|
||||||
def verify_extensions(os):
|
def verify_extensions(os):
|
||||||
results = {}
|
results = {}
|
||||||
extensions_client = os.extensions_client
|
extensions_client = os.extensions_client
|
||||||
@ -57,6 +69,7 @@ def display_results(results):
|
|||||||
def main(argv):
|
def main(argv):
|
||||||
os = clients.ComputeAdminManager(interface='json')
|
os = clients.ComputeAdminManager(interface='json')
|
||||||
results = verify_extensions(os)
|
results = verify_extensions(os)
|
||||||
|
verify_glance_api_versions(os)
|
||||||
display_results(results)
|
display_results(results)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user