diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2013-07-19 17:11:43 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2013-07-31 12:04:30 -0500 |
commit | 3268a4b96449647faa76e5521660516fbc9e8a84 (patch) | |
tree | 4af0e6e13827c6df5cecb28b1a663ad2de1d3274 /keystone/service.py | |
parent | 3c6cc9e838cacd1f7c0a3cfc89b0f66b23851803 (diff) | |
download | keystone-3268a4b96449647faa76e5521660516fbc9e8a84.tar.gz keystone-3268a4b96449647faa76e5521660516fbc9e8a84.tar.xz keystone-3268a4b96449647faa76e5521660516fbc9e8a84.zip |
Use dependency injection for assignment and identity
The assignment and identity backends don't use normal
dependency injection because of a circular reference.
Support for circular references was added, so these
backends can now use normal dependency injection.
Fixes: bug 1200769
Fixes: bug 1204605
Change-Id: I8716a65b984c26fcaaf2595463db09e1f02cb475
Diffstat (limited to 'keystone/service.py')
-rw-r--r-- | keystone/service.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/keystone/service.py b/keystone/service.py index 775dfe5d..ce64aba8 100644 --- a/keystone/service.py +++ b/keystone/service.py @@ -16,6 +16,7 @@ import routes +from keystone import assignment from keystone import auth from keystone import catalog from keystone.common import dependency @@ -35,11 +36,18 @@ from keystone import trust CONF = config.CONF LOG = logging.getLogger(__name__) + +# Ensure that the identity driver is created before the assignment manager. +# The default assignment driver is determined by the identity driver, so the +# identity driver must be available to the assignment manager. +_IDENTITY_API = identity.Manager() + DRIVERS = dict( + assignment_api=assignment.Manager(), catalog_api=catalog.Manager(), credentials_api=credential.Manager(), ec2_api=ec2.Manager(), - identity_api=identity.Manager(), + identity_api=_IDENTITY_API, policy_api=policy.Manager(), token_api=token.Manager(), trust_api=trust.Manager(), |