Give keystoneauth1.ClientException only 1 argument (message)
Change-Id: I970b07e52ed7f2f4440b47800fcb3b6528dce22d
This commit is contained in:
parent
58ad91595d
commit
941f64915e
@ -1054,7 +1054,8 @@ class OpenStackAuthTestsV3WithMock(test.TestCase):
|
|||||||
form_data = self.get_form_data(user)
|
form_data = self.get_form_data(user)
|
||||||
url = reverse('login')
|
url = reverse('login')
|
||||||
|
|
||||||
mock_get_access.side_effect = keystone_exceptions.ClientException(500)
|
mock_get_access.side_effect = \
|
||||||
|
keystone_exceptions.ClientException('error 500')
|
||||||
|
|
||||||
# GET the page to set the test cookie.
|
# GET the page to set the test cookie.
|
||||||
response = self.client.get(url, form_data)
|
response = self.client.get(url, form_data)
|
||||||
|
@ -437,7 +437,7 @@ def user_update(request, user, **data):
|
|||||||
|
|
||||||
if not keystone_can_edit_user():
|
if not keystone_can_edit_user():
|
||||||
raise keystone_exceptions.ClientException(
|
raise keystone_exceptions.ClientException(
|
||||||
405, _("Identity service does not allow editing user data."))
|
_("Identity service does not allow editing user data."))
|
||||||
try:
|
try:
|
||||||
user = manager.update(user, **data)
|
user = manager.update(user, **data)
|
||||||
except keystone_exceptions.Conflict:
|
except keystone_exceptions.Conflict:
|
||||||
@ -455,7 +455,7 @@ def user_update_password(request, user, password, admin=True):
|
|||||||
|
|
||||||
if not keystone_can_edit_user():
|
if not keystone_can_edit_user():
|
||||||
raise keystone_exceptions.ClientException(
|
raise keystone_exceptions.ClientException(
|
||||||
405, _("Identity service does not allow editing user password."))
|
_("Identity service does not allow editing user password."))
|
||||||
|
|
||||||
manager = keystoneclient(request, admin=admin).users
|
manager = keystoneclient(request, admin=admin).users
|
||||||
manager.update(user, password=password)
|
manager.update(user, password=password)
|
||||||
|
@ -116,7 +116,7 @@ class DeleteDomainsAction(tables.DeleteAction):
|
|||||||
msg = _('Domain "%s" must be disabled before it can be deleted.') \
|
msg = _('Domain "%s" must be disabled before it can be deleted.') \
|
||||||
% domain.name
|
% domain.name
|
||||||
messages.error(request, msg)
|
messages.error(request, msg)
|
||||||
raise keystoneclient_exceptions.ClientException(409, msg)
|
raise keystoneclient_exceptions.ClientException(msg)
|
||||||
else:
|
else:
|
||||||
LOG.info('Deleting domain "%s".', obj_id)
|
LOG.info('Deleting domain "%s".', obj_id)
|
||||||
api.keystone.domain_delete(request, obj_id)
|
api.keystone.domain_delete(request, obj_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user