From: Ryan McNair <rdmcnair@us.ibm.com>
Date: Wed, 2 Mar 2016 00:07:14 +0000 (+0000)
Subject: Update quota_utils with import for keystone_auth
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4d66d2e833b86156e49ee34da49f7d6040945af1;p=openstack-build%2Fcinder-build.git

Update quota_utils with import for keystone_auth

Currently, keystone_auth config group is only getting defined in
the cinder-api service. In order to be able to use the quota_utils
helper from both the c-api and c-vol, we need to make sure that
the CONF.keystone_authtoken always gets imported. This is needed
to properly handle nested quota deletes which occur in the c-vol
service.

Change-Id: I3ebb9979d37f62db161e2929fe2cff5a8ba2bf96
---

diff --git a/cinder/quota_utils.py b/cinder/quota_utils.py
index d7cd82a47..d99507ba4 100644
--- a/cinder/quota_utils.py
+++ b/cinder/quota_utils.py
@@ -27,7 +27,8 @@ from cinder import exception
 from cinder.i18n import _, _LW
 
 CONF = cfg.CONF
-
+CONF.import_opt('auth_uri', 'keystonemiddleware.auth_token.__init__',
+                'keystone_authtoken')
 
 LOG = logging.getLogger(__name__)