From 53a175e7c6aca860f9a9eaa4af6d9801d0cfdba4 Mon Sep 17 00:00:00 2001 From: Rodrigo Duarte Sousa Date: Mon, 2 Jun 2014 18:44:59 -0300 Subject: [PATCH] Changes exception raised by v3.trusts.update() The client should raise a Client error, instead of a Server one. The MethodNotImplemented exeception handles calls made to not supported methods. Change-Id: I0e2a8c5e1e53b0f17b886aa693c922bc193bb882 Closes-Bug: #1325755 --- keystoneclient/tests/v3/test_trusts.py | 2 +- keystoneclient/v3/contrib/trusts.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keystoneclient/tests/v3/test_trusts.py b/keystoneclient/tests/v3/test_trusts.py index 43bfb1b53..15e934888 100644 --- a/keystoneclient/tests/v3/test_trusts.py +++ b/keystoneclient/tests/v3/test_trusts.py @@ -105,4 +105,4 @@ class TrustTests(utils.TestCase, utils.CrudTests): def test_update(self): # Update not supported for the OS-TRUST API - self.assertRaises(exceptions.HttpNotImplemented, self.manager.update) + self.assertRaises(exceptions.MethodNotImplemented, self.manager.update) diff --git a/keystoneclient/v3/contrib/trusts.py b/keystoneclient/v3/contrib/trusts.py index 9336b1e0a..ed199e6ed 100644 --- a/keystoneclient/v3/contrib/trusts.py +++ b/keystoneclient/v3/contrib/trusts.py @@ -74,7 +74,8 @@ class TrustManager(base.CrudManager): **kwargs) def update(self): - raise exceptions.HttpNotImplemented("Update not supported for trusts") + raise exceptions.MethodNotImplemented('Update not supported' + ' for trusts') def list(self, trustee_user=None, trustor_user=None, **kwargs): """List Trusts."""