From 7679ba7540bc99df1cd3ba1d10285fd0713f1281 Mon Sep 17 00:00:00 2001 From: privaterookie <996514515@qq.com> Date: Sun, 12 Aug 2018 22:51:16 +0800 Subject: [PATCH] fix mistral client failure when project_name and project_id are provided at the same time, mistral client will ignore project_name, and if username and user_id are provided at the same time, username will be ignored. Change-Id: Ice720cafceb4904c218122c558c06346e9031650 Closes-Bug: #1785453 --- mistralclient/auth/keystone.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mistralclient/auth/keystone.py b/mistralclient/auth/keystone.py index ad90f360..e8c4445a 100644 --- a/mistralclient/auth/keystone.py +++ b/mistralclient/auth/keystone.py @@ -97,13 +97,17 @@ class KeystoneAuthHandler(mistral_auth.AuthHandler): **kwargs): if project_name and project_id: - raise RuntimeError( - 'Only one of project_name or project_id should be set' + project_name = None + LOG.warning( + "Only one of project_name or project_id should be set," + "project_name will be ignored" ) if username and user_id: - raise RuntimeError( - 'Only one of username or user_id should be set' + username = None + LOG.warning( + "Only one of username or user_id should be set," + "username will be ignored" ) auth = {}