summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kranz <dkranz@redhat.com>2015-04-08 11:18:19 -0400
committerDavid Kranz <dkranz@redhat.com>2015-04-08 11:18:19 -0400
commit799eee12548adc2b435b2ef095f2b8388dc36590 (patch)
tree5815daeb0030b589f7af3df29ea5c1c739f58310
parentf0f063967e58818f6fb9a2ddde06a3b98564fb02 (diff)
downloadtempest-799eee12548adc2b435b2ef095f2b8388dc36590.tar.gz
Make this script work with keystone v2 and v3
Change-Id: Ic3871eeadd77945ff70f925892e25d36435075fd
-rwxr-xr-xtempest/cmd/verify_tempest_config.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 3c71e072e..b61f286ee 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -24,6 +24,7 @@ import httplib2
from six import moves
from tempest import clients
+from tempest.common import credentials
from tempest import config
@@ -254,7 +255,11 @@ def check_service_availability(os, update):
}
# Get catalog list for endpoints to use for validation
_token, auth_data = os.auth_provider.get_auth()
- for entry in auth_data['serviceCatalog']:
+ if os.auth_version == 'v2':
+ catalog_key = 'serviceCatalog'
+ else:
+ catalog_key = 'catalog'
+ for entry in auth_data[catalog_key]:
services.append(entry['type'])
# Pull all catalog types from config file and compare against endpoint list
for cfgname in dir(CONF._config):
@@ -329,7 +334,8 @@ def main():
CONF_PARSER = moves.configparser.SafeConfigParser()
CONF_PARSER.optionxform = str
CONF_PARSER.readfp(conf_file)
- os = clients.Manager()
+ icreds = credentials.get_isolated_credentials('verify_tempest_config')
+ os = clients.Manager(icreds.get_primary_creds())
services = check_service_availability(os, update)
results = {}
for service in ['nova', 'cinder', 'neutron', 'swift']: