From 9e54c628b16dc2c244b846cc56014262b1125b74 Mon Sep 17 00:00:00 2001 From: David Stanek Date: Tue, 29 Nov 2016 20:30:39 +0000 Subject: [PATCH] Removes unused exceptions Exception | Last use removed in changeset ---------------------------------------------------------------------- ImmutableAttributeError | I017c14e4d1229951e389a9e8d48384b54e197dd3 MetadataNotFound | Ic7737fc44c1d1a86521c428216316d06b67dd1f9 InvalidParentProject | I848bf41022224fec65cd9555a6e82790b296dcbe KeystoneConfigurationError | I6fb9b7fa401c0805a538b46141a4d8c8df2093cf UnsupportedDriverVersion | I4672cf7d9d72ef725212085972dbcd90db0e47cf Change-Id: I0c892d6bbad652b0c460cb5787418c3a769196f5 --- keystone/exception.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/keystone/exception.py b/keystone/exception.py index 39bf5d0fa5..d3eae889fd 100644 --- a/keystone/exception.py +++ b/keystone/exception.py @@ -284,11 +284,6 @@ class ForbiddenAction(Forbidden): " requested action: %(action)s") -class ImmutableAttributeError(Forbidden): - message_format = _("Could not change immutable attribute(s) " - "'%(attributes)s' in target %(target)s") - - class CrossBackendNotAllowed(Forbidden): message_format = _("Group membership across backend boundaries is not " "allowed, group in question is %(group_id)s, " @@ -316,14 +311,6 @@ class EndpointNotFound(NotFound): message_format = _("Could not find endpoint: %(endpoint_id)s") -class MetadataNotFound(NotFound): - # NOTE (dolph): metadata is not a user-facing concept, - # so this exception should not be exposed. - - message_format = _("An unhandled exception has occurred:" - " Could not find metadata.") - - class PolicyNotFound(NotFound): message_format = _("Could not find policy: %(policy_id)s") @@ -371,10 +358,6 @@ class ProjectNotFound(NotFound): message_format = _("Could not find project: %(project_id)s") -class InvalidParentProject(NotFound): - message_format = _("Cannot create project with parent: %(project_id)s") - - class TokenNotFound(NotFound): message_format = _("Could not find token: %(token_id)s") @@ -442,12 +425,6 @@ class ConfigRegistrationNotFound(Exception): pass -class KeystoneConfigurationError(Exception): - # This is an exception to be used in the case that Keystone config is - # invalid and Keystone should not start. - pass - - class Conflict(Error): message_format = _("Conflict occurred attempting to store %(type)s -" " %(details)s") @@ -579,10 +556,6 @@ class TokenlessAuthConfigError(ValidationError): 'was not found in the request environment.') -class UnsupportedDriverVersion(UnexpectedError): - debug_message_format = _('%(driver)s is not supported driver version') - - class CredentialEncryptionError(Exception): message_format = _("An unexpected error prevented the server " "from accessing encrypted credentials.")