summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-01-17 14:16:29 -0500
committermbeierl <mark.beierl@dell.com>2017-01-17 14:16:29 -0500
commitc3eff480168e4dca242654374c31857dfb577141 (patch)
tree3efefcf7f5cb66256ed49a6545b0bf0f7bee44db
parentab2c2817ec8d3a60d7bc61249217107e2b99a18c (diff)
Expose TENANT_ID
Change-Id: I2b07bb9724b19f8b25e35160fba3bf11621a30d7 JIRA: STORPERF-93 Signed-off-by: mbeierl <mark.beierl@dell.com>
-rw-r--r--storperf/storperf_master.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/storperf/storperf_master.py b/storperf/storperf_master.py
index ecf5be6..7bbadae 100644
--- a/storperf/storperf_master.py
+++ b/storperf/storperf_master.py
@@ -8,23 +8,23 @@
##############################################################################
from datetime import datetime
-from storperf.db.configuration_db import ConfigurationDB
-from storperf.db.graphite_db import GraphiteDB
-from storperf.db.job_db import JobDB
-from threading import Thread
-from time import sleep
import logging
import os
import socket
+from threading import Thread
+from time import sleep
from cinderclient import client as cinderclient
from keystoneauth1 import loading
from keystoneauth1 import session
-from scp import SCPClient
import paramiko
+from scp import SCPClient
-from test_executor import TestExecutor
import heatclient.client as heatclient
+from storperf.db.configuration_db import ConfigurationDB
+from storperf.db.graphite_db import GraphiteDB
+from storperf.db.job_db import JobDB
+from storperf.test_executor import TestExecutor
class ParameterError(Exception):
@@ -156,7 +156,7 @@ class StorPerfMaster(object):
def volume_quota(self):
self._attach_to_openstack()
quotas = self._cinder_client.quotas.get(
- os.environ.get('OS_TENANT_NAME'))
+ os.environ.get('OS_TENANT_ID'))
return int(quotas.volumes)
@property
@@ -401,6 +401,7 @@ class StorPerfMaster(object):
"project_name": os.environ.get('OS_PROJECT_NAME'),
"project_id": os.environ.get('OS_PROJECT_ID'),
"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')
}