Fix rally verify fail (cause of rally KeyError: 'admin')

Closes-Bug: #1366824

Change-Id: Id84ff2f529247796855f2439b3e14acbd38f1979
This commit is contained in:
Olga Kopylova 2014-09-08 18:26:00 +03:00
parent aeb46c055c
commit ce8b11a4df
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class TempestConf(object):
def _get_url(self, servicename):
for service in self.keystoneclient.auth_ref['serviceCatalog']:
if service['name'] == servicename:
return service['admin']['publicURL']
return service["endpoints"][0]["publicURL"]
def _set_default(self):
lock_path = os.path.join(self.data_path,

View File

@ -84,7 +84,7 @@ class ConfigTestCase(test.TestCase):
self.conf_generator.keystoneclient.auth_ref = {
"serviceCatalog": [{
"name": service,
"admin": {"publicURL": url}
"endpoints": [{"publicURL": url}]
}]}
self.assertEqual(self.conf_generator._get_url(service), url)