Fix get versions call in verify_nova_api_versions()
This commit fixes the HTTP GET call to return the list of nova api
versions. The enpoint that the tempest clients use for servers
includes the api version. This is because nova registers each version
api as separate endpoints in keystone's catalog. So this commit fixes
the url to use the unversioned endpoint so the list of versions will
be returned.
Change-Id: Iaf4671d4d1dd285161aa5679648956c086a9119c
diff --git a/tools/verify_tempest_config.py b/tools/verify_tempest_config.py
index 29eed9d..4be812c 100755
--- a/tools/verify_tempest_config.py
+++ b/tools/verify_tempest_config.py
@@ -42,7 +42,12 @@
def verify_nova_api_versions(os):
# Check nova api versions - only get base URL without PATH
os.servers_client.skip_path = True
- __, body = RAW_HTTP.request(os.servers_client.base_url, 'GET')
+ # The nova base endpoint url includes the version but to get the versions
+ # list the unversioned endpoint is needed
+ v2_endpoint = os.servers_client.base_url
+ v2_endpoint_parts = v2_endpoint.split('/')
+ endpoint = v2_endpoint_parts[0] + '//' + v2_endpoint_parts[2]
+ __, body = RAW_HTTP.request(endpoint, 'GET')
body = json.loads(body)
# Restore full base_url
os.servers_client.skip_path = False