diff --git a/devstack/lib/heat b/devstack/lib/heat index a3b9469f96..98f265ae2e 100644 --- a/devstack/lib/heat +++ b/devstack/lib/heat @@ -501,7 +501,6 @@ function configure_tempest_for_heat { iniset $TEMPEST_CONFIG heat_plugin user_domain_name $OS_USER_DOMAIN_NAME iniset $TEMPEST_CONFIG heat_plugin project_domain_name $OS_PROJECT_DOMAIN_NAME iniset $TEMPEST_CONFIG heat_plugin region $OS_REGION_NAME - iniset $TEMPEST_CONFIG heat_plugin auth_version 3 source $TOP_DIR/openrc admin admin iniset $TEMPEST_CONFIG heat_plugin admin_username $OS_USERNAME diff --git a/heat_integrationtests/common/clients.py b/heat_integrationtests/common/clients.py index 2eece155a7..cb75fa3696 100644 --- a/heat_integrationtests/common/clients.py +++ b/heat_integrationtests/common/clients.py @@ -12,7 +12,6 @@ import os -from heat.common.i18n import _ from heatclient import client as heat_client from keystoneauth1.identity.generic import password from keystoneauth1 import session @@ -59,20 +58,14 @@ class ClientManager(object): calling various OpenStack APIs. """ - HEATCLIENT_VERSION = '1' + HEAT_API_VERSION = '1' + KEYSTONE_API_VERSION = '3' NOVA_API_VERSION = '2.1' def __init__(self, conf, admin_credentials=False): self.conf = conf self.admin_credentials = admin_credentials - self.auth_version = self.conf.auth_version - if not self.auth_version: - try: - self.auth_version = self.conf.auth_url.split('/v')[1] - except IndexError: - raise ValueError(_('Please specify version in auth_url or ' - 'auth_version in config.')) self.insecure = self.conf.disable_ssl_certificate_validation self.ca_file = self.conf.ca_file @@ -105,7 +98,7 @@ class ClientManager(object): session = self.identity_client.session return heat_client.Client( - self.HEATCLIENT_VERSION, + self.HEAT_API_VERSION, endpoint, session=session, endpoint_type='publicURL', @@ -123,15 +116,12 @@ class ClientManager(object): 'username': self._username(), 'password': self._password(), 'project_name': self._project_name(), - 'auth_url': self.conf.auth_url + 'auth_url': self.conf.auth_url, + 'user_domain_id': user_domain_id, + 'project_domain_id': project_domain_id, + 'user_domain_name': user_domain_name, + 'project_domain_name': project_domain_name } - # keystone v2 can't ignore domain details - if self.auth_version == '3': - kwargs.update({ - 'user_domain_id': user_domain_id, - 'project_domain_id': project_domain_id, - 'user_domain_name': user_domain_name, - 'project_domain_name': project_domain_name}) auth = password.Password(**kwargs) if self.insecure: verify_cert = False @@ -160,7 +150,7 @@ class ClientManager(object): def _get_object_client(self): args = { - 'auth_version': self.auth_version, + 'auth_version': self.KEYSTONE_API_VERSION, 'session': self.identity_client.session, 'os_options': {'endpoint_type': 'publicURL', 'region_name': self.conf.region,