summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUmar Farooq <umar.farooq@neclab.eu>2017-05-29 15:18:42 +0000
committerUmar Farooq <umar.farooq@neclab.eu>2017-05-29 15:26:56 +0000
commitb2614799f404ed44b19d5dbc7c0b6229071c87bb (patch)
tree6550187745b5295262151dfb77ca1aca4467d0bd /tests
parentf77107087079caa9b1602be6308d98107c9639b8 (diff)
Add Keystone missing params
The values of OS_USER_DOMAIN_ID and OS_PROJECT_DOMAIN_ID are needed as auth parameters else the nova API gives HTTP 400 error. JIRA: DOCTOR-108 Change-Id: I58b746e5216c00d2f78b0ccf899b69fe66c15848 Signed-off-by: Umar Farooq <umar.farooq@neclab.eu>
Diffstat (limited to 'tests')
-rw-r--r--tests/identity_auth.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/identity_auth.py b/tests/identity_auth.py
index a40c41cf..ffecc68a 100644
--- a/tests/identity_auth.py
+++ b/tests/identity_auth.py
@@ -17,9 +17,11 @@ def get_identity_auth():
auth_url = os.environ['OS_AUTH_URL']
username = os.environ['OS_USERNAME']
password = os.environ['OS_PASSWORD']
- user_domain_name = os.environ.get('OS_USER_DOMAIN_NAME')
+ user_domain_name = os.environ.get('OS_USER_DOMAIN_NAME') or 'default'
+ user_domain_id = os.environ.get('OS_USER_DOMAIN_ID') or 'default'
project_name = os.environ.get('OS_PROJECT_NAME') or os.environ.get('OS_TENANT_NAME')
- project_domain_name = os.environ.get('OS_PROJECT_DOMAIN_NAME')
+ project_domain_name = os.environ.get('OS_PROJECT_DOMAIN_NAME') or 'default'
+ project_domain_id = os.environ.get('OS_PROJECT_DOMAIN_ID') or 'default'
loader = loading.get_plugin_loader('password')
return loader.load_from_options(
@@ -27,9 +29,11 @@ def get_identity_auth():
username=username,
password=password,
user_domain_name=user_domain_name,
+ user_domain_id=user_domain_id,
project_name=project_name,
tenant_name=project_name,
- project_domain_name=project_domain_name)
+ project_domain_name=project_domain_name,
+ project_domain_id=project_domain_id)
def get_session(auth=None):