Use project_name/admin_project_name config option

This deprecates the tenant_name and admin_tenant_name config option
for integration tests.

Change-Id: Iabc56ddabeeda36d27ea3c9ce04c71e13be676d7
This commit is contained in:
rabi
2017-04-11 09:54:07 +05:30
parent e7999a9c5d
commit f6c1203b51
4 changed files with 14 additions and 10 deletions

View File

@@ -97,10 +97,10 @@ class ClientManager(object):
return self.conf.admin_password return self.conf.admin_password
return self.conf.password return self.conf.password
def _tenant_name(self): def _project_name(self):
if self.admin_credentials: if self.admin_credentials:
return self.conf.admin_tenant_name return self.conf.admin_project_name
return self.conf.tenant_name return self.conf.project_name
def _get_orchestration_client(self): def _get_orchestration_client(self):
endpoint = os.environ.get('HEAT_URL') endpoint = os.environ.get('HEAT_URL')
@@ -130,7 +130,7 @@ class ClientManager(object):
kwargs = { kwargs = {
'username': self._username(), 'username': self._username(),
'password': self._password(), 'password': self._password(),
'tenant_name': self._tenant_name(), 'project_name': self._project_name(),
'auth_url': self.conf.auth_url 'auth_url': self.conf.auth_url
} }
# keystone v2 can't ignore domain details # keystone v2 can't ignore domain details

View File

@@ -40,11 +40,15 @@ HeatGroup = [
cfg.StrOpt('admin_password', cfg.StrOpt('admin_password',
help="Admin API key to use when authentication.", help="Admin API key to use when authentication.",
secret=True), secret=True),
cfg.StrOpt('tenant_name', cfg.StrOpt('project_name',
help="Tenant name to use for API requests."), help="Project name to use for API requests.",
cfg.StrOpt('admin_tenant_name', deprecated_opts=[cfg.DeprecatedOpt('tenant_name',
group='heat_plugin')]),
cfg.StrOpt('admin_project_name',
default='admin', default='admin',
help="Admin tenant name to use for admin API requests."), help="Admin project name to use for admin API requests.",
deprecated_opts=[cfg.DeprecatedOpt('admin_tenant_name',
group='heat_plugin')]),
cfg.StrOpt('auth_url', cfg.StrOpt('auth_url',
help="Full URI of the OpenStack Identity API (Keystone)"), help="Full URI of the OpenStack Identity API (Keystone)"),
cfg.StrOpt('user_domain_name', cfg.StrOpt('user_domain_name',

View File

@@ -42,7 +42,7 @@ resources:
'options': { 'options': {
'os_username': self.conf.username, 'os_username': self.conf.username,
'os_password': self.conf.password, 'os_password': self.conf.password,
'os_project_name': self.conf.tenant_name, 'os_project_name': self.conf.project_name,
'os_auth_url': self.conf.auth_url, 'os_auth_url': self.conf.auth_url,
'os_user_domain_id': self.conf.user_domain_id, 'os_user_domain_id': self.conf.user_domain_id,
'os_project_domain_id': self.conf.project_domain_id, 'os_project_domain_id': self.conf.project_domain_id,

View File

@@ -31,7 +31,7 @@ source $DEST/devstack/openrc demo demo
# user creds # user creds
iniset $conf_file heat_plugin username $OS_USERNAME iniset $conf_file heat_plugin username $OS_USERNAME
iniset $conf_file heat_plugin password $OS_PASSWORD iniset $conf_file heat_plugin password $OS_PASSWORD
iniset $conf_file heat_plugin tenant_name $OS_PROJECT_NAME iniset $conf_file heat_plugin project_name $OS_PROJECT_NAME
iniset $conf_file heat_plugin auth_url $OS_AUTH_URL iniset $conf_file heat_plugin auth_url $OS_AUTH_URL
iniset $conf_file heat_plugin user_domain_id $OS_USER_DOMAIN_ID iniset $conf_file heat_plugin user_domain_id $OS_USER_DOMAIN_ID
iniset $conf_file heat_plugin project_domain_id $OS_PROJECT_DOMAIN_ID iniset $conf_file heat_plugin project_domain_id $OS_PROJECT_DOMAIN_ID