From 852d63c2f0d3f4710f893d5bbfc112ed6e794100 Mon Sep 17 00:00:00 2001 From: Shuicheng Lin Date: Mon, 14 Jan 2019 23:09:00 +0800 Subject: [PATCH] Fix build failure with python-django-openstack-auth Story: 2004522 Task: 28420 Change-Id: I7f06994f9e32bb4cdfbd547b065f4f55fb43c40c Signed-off-by: Shuicheng Lin --- .../patches/0004-Distributed-Keystone.patch | 20 +------------------ .../patches/fix_for_dc_region_switching.patch | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/openstack/python-django-openstack-auth/centos/patches/0004-Distributed-Keystone.patch b/openstack/python-django-openstack-auth/centos/patches/0004-Distributed-Keystone.patch index 04d9c444..30d81d7e 100644 --- a/openstack/python-django-openstack-auth/centos/patches/0004-Distributed-Keystone.patch +++ b/openstack/python-django-openstack-auth/centos/patches/0004-Distributed-Keystone.patch @@ -14,29 +14,11 @@ Central Region, there was no way to go back in Horizon from a subcloud region to the SystemController region. We achieve this by caching the SystemController endpoint in the Django Session at the time of login --- - openstack_auth/forms.py | 4 +-- openstack_auth/user.py | 8 ++++- openstack_auth/utils.py | 47 ++++++++++++++++++++++++----- openstack_auth/views.py | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- - 4 files changed, 125 insertions(+), 12 deletions(-) + 3 files changed, 123 insertions(+), 10 deletions(-) -diff --git a/openstack_auth/forms.py b/openstack_auth/forms.py -index 90e281b..4834ab2 100644 ---- a/openstack_auth/forms.py -+++ b/openstack_auth/forms.py -@@ -154,10 +154,10 @@ class Login(django_auth_forms.AuthenticationForm): - # since this user logged in successfully, clear its - # lockout status - utils.clear_user_lockout(username) -- -+ - # handle user login - utils.handle_user_login(username, password) -- -+ - except exceptions.KeystoneAuthException as exc: - if getattr(exc,"invalidCredentials", False): - msg = 'Login failed for user "%(username)s", remote address '\ diff --git a/openstack_auth/user.py b/openstack_auth/user.py index f486bfa..39e3e34 100644 --- a/openstack_auth/user.py diff --git a/openstack/python-django-openstack-auth/centos/patches/fix_for_dc_region_switching.patch b/openstack/python-django-openstack-auth/centos/patches/fix_for_dc_region_switching.patch index 97d31f0c..77d8e485 100644 --- a/openstack/python-django-openstack-auth/centos/patches/fix_for_dc_region_switching.patch +++ b/openstack/python-django-openstack-auth/centos/patches/fix_for_dc_region_switching.patch @@ -85,7 +85,7 @@ index a680abf..0b1351d 100644 if not region_auth_url: msg = _('Cannot switch to subcloud %s, no Identity available ' -@@ -324,7 +326,8 @@ def switch_region(request, region_name, +@@ -320,7 +322,8 @@ def switch_region(request, region_name, try: request.user = auth.authenticate( request=request, auth_url=unscoped_auth.auth_url,