Modified to use Identity v2.0

Horizon defaults to Identity v3, which broke the Congress
dashboard. This forces the use of Identity v2.0 for
the Newton release.

Change-Id: I2a1288bd1998da6c7e0da22bab93cf0da14f1eaf
Closes-bug: #1602837
This commit is contained in:
aimee.ukasick 2016-09-16 10:35:26 -05:00 committed by Eric K
parent c4de4cf4f4
commit 9b9e2baee5
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ class PolicyTable(PolicyAPIDictWrapper):
def congressclient(request):
"""Instantiate Congress client."""
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL')
# TODO(aimeeu) fix this for identity v3
if auth_url[-3:] == '/v3':
auth_url = auth_url[:-3] + '/v2.0'
user = request.user
auth = keystoneclient.auth.identity.v2.Token(auth_url, user.token.id,
tenant_id=user.tenant_id,