Improved keystone error handling in syspanel.
* Added "AuthorizationFailure" to the recoverable errors list
since keystoneclient raises it anytime it can't talk to
keystone. Fixes bug 971249.
* Used proper exception handling for the users index view.
Fixed some tests that had been failiing but masked previously.
Fixes bug 971250.
Change-Id: Iec8c1fc7bf8585a529fa15af55f807abc0f84d42
This commit is contained in:
@@ -45,7 +45,8 @@ class IndexView(tables.DataTableView):
|
||||
try:
|
||||
tenants = api.keystone.tenant_list(self.request, admin=True)
|
||||
except:
|
||||
exceptions.handle(self.request)
|
||||
exceptions.handle(self.request,
|
||||
_("Unable to retrieve project list."))
|
||||
tenants.sort(key=lambda x: x.id, reverse=True)
|
||||
return tenants
|
||||
|
||||
@@ -67,7 +68,7 @@ class UpdateView(forms.ModalFormView):
|
||||
except:
|
||||
redirect = reverse("horizon:syspanel:projects:index")
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve tenant.'),
|
||||
_('Unable to retrieve project.'),
|
||||
redirect=redirect)
|
||||
|
||||
def get_initial(self):
|
||||
|
||||
Reference in New Issue
Block a user