summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-05-24 13:25:07 -0400
committermbeierl <mark.beierl@dell.com>2017-05-24 13:25:07 -0400
commit99171196e616d0c24568246b4c8d4b1a76f92660 (patch)
treeb72f9be69173c99be754468b09044010537ae812
parent60ffe3f74c0df89b5fef3c45770db63922555970 (diff)
Adding domain to authentication
Adds domain if present in environment variables to user and project Change-Id: I05fca2fbdeef4fa985bfb505f9158ce31da5ab9c JIRA: STORPERF-127 Signed-off-by: mbeierl <mark.beierl@dell.com>
-rw-r--r--storperf/storperf_master.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/storperf/storperf_master.py b/storperf/storperf_master.py
index 7acc510..440f5b3 100644
--- a/storperf/storperf_master.py
+++ b/storperf/storperf_master.py
@@ -11,20 +11,19 @@ from datetime import datetime
import logging
import os
import socket
+from storperf.db.configuration_db import ConfigurationDB
+from storperf.db.job_db import JobDB
+from storperf.test_executor import TestExecutor
from threading import Thread
from time import sleep
from cinderclient import client as cinderclient
+import heatclient.client as heatclient
from keystoneauth1 import loading
from keystoneauth1 import session
import paramiko
from scp import SCPClient
-import heatclient.client as heatclient
-from storperf.db.configuration_db import ConfigurationDB
-from storperf.db.job_db import JobDB
-from storperf.test_executor import TestExecutor
-
class ParameterError(Exception):
""" """
@@ -387,13 +386,18 @@ class StorPerfMaster(object):
"username": os.environ.get('OS_USERNAME'),
"password": os.environ.get('OS_PASSWORD'),
"auth_url": os.environ.get('OS_AUTH_URL'),
- "project_name": os.environ.get('OS_PROJECT_NAME'),
+ "project_domain_name":
+ os.environ.get('OS_PROJECT_DOMAIN_NAME'),
"project_id": os.environ.get('OS_PROJECT_ID'),
+ "project_name": os.environ.get('OS_PROJECT_NAME'),
"tenant_name": os.environ.get('OS_TENANT_NAME'),
"tenant_id": os.environ.get("OS_TENANT_ID"),
- "user_domain_id": os.environ.get('OS_USER_DOMAIN_ID')
+ "user_domain_id": os.environ.get('OS_USER_DOMAIN_ID'),
+ "user_domain_name": os.environ.get('OS_USER_DOMAIN_NAME')
}
+ self.logger.debug("Creds: %s" % creds)
+
loader = loading.get_plugin_loader('password')
auth = loader.load_from_options(**creds)
sess = session.Session(auth=auth)