From ab32ce73f6deacfa8ddf4761012aae8f7299d628 Mon Sep 17 00:00:00 2001 From: liyingjun Date: Thu, 24 Dec 2015 17:22:18 +0800 Subject: [PATCH] Replace tenant_id with project_id in auth_utils The 'tenant_id' passing to keystoneclient.v3.client.Client is deprecated, and may be removed in the 2.0.0 release[1]. Replace it with 'project_id' as suggested. [1]: https://github.com/openstack/python-keystoneclient/blob/f8c47a1aa0c12e2fb374e66f8787287069acbdd9/keystoneclient/v3/client.py#L73 Change-Id: I2898bb10e4373916b06c90b6b18ceb65845ae3b7 Related-Bug: #1514756 --- murano/common/auth_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/murano/common/auth_utils.py b/murano/common/auth_utils.py index 3f844a17..2a09bc9c 100644 --- a/murano/common/auth_utils.py +++ b/murano/common/auth_utils.py @@ -18,11 +18,11 @@ from oslo_config import cfg from oslo_utils import importutils -def get_client(token, tenant_id): +def get_client(token, project_id): settings = _get_keystone_settings() kwargs = { 'token': token, - 'tenant_id': tenant_id, + 'project_id': project_id, 'auth_url': settings['auth_url'] } kwargs.update(settings['ssl']) @@ -65,8 +65,8 @@ def get_client_for_trusts(trust_id): return _admin_client(trust_id) -def create_trust(token, tenant_id): - client = get_client(token, tenant_id) +def create_trust(token, project_id): + client = get_client(token, project_id) settings = _get_keystone_settings() trustee_id = get_client_for_admin( @@ -77,7 +77,7 @@ def create_trust(token, tenant_id): trustee_user=trustee_id, impersonation=True, role_names=roles, - project=tenant_id) + project=project_id) return trust.id