summaryrefslogtreecommitdiff
path: root/openstack_dashboard/exceptions.py
diff options
context:
space:
mode:
authorGeorge Peristerakis <george.peristerakis@enovance.com>2015-02-20 12:05:10 -0500
committerGeorge Peristerakis <gperiste@redhat.com>2015-04-01 15:00:30 -0400
commit7fc1baad3a909465423810758a8d83c4715a1010 (patch)
tree6b52261b6ba75e354922e8fa2f9e244bcd2b085f /openstack_dashboard/exceptions.py
parentc38d3029a09206fb656fb8ccce9c44e3bb303565 (diff)
downloadhorizon-7fc1baad3a909465423810758a8d83c4715a1010.tar.gz
Refactoring the exceptions lists
The exception list is not properly used. The exception list is a settings constant that can be modified within the settings file. Having the list in openstack_dashboard/exceptions.py confuses the developers. The list of exceptions are moved in the settings file and removed all duplications. Partially Implements: blueprint improve-error-message-details-for-usability Change-Id: I5e19c3f0b84b17fa28f6e3c113467cc19d9b0a03
Diffstat (limited to 'openstack_dashboard/exceptions.py')
-rw-r--r--openstack_dashboard/exceptions.py73
1 files changed, 0 insertions, 73 deletions
diff --git a/openstack_dashboard/exceptions.py b/openstack_dashboard/exceptions.py
deleted file mode 100644
index a84d09f6a..000000000
--- a/openstack_dashboard/exceptions.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 2012 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Copyright 2012 Nebula, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from cinderclient import exceptions as cinderclient
-from glanceclient.common import exceptions as glanceclient
-from heatclient import exc as heatclient
-from keystoneclient import exceptions as keystoneclient
-from neutronclient.common import exceptions as neutronclient
-from novaclient import exceptions as novaclient
-from requests import exceptions as requests
-from saharaclient.api import base as saharaclient
-from swiftclient import client as swiftclient
-from troveclient import exceptions as troveclient
-
-
-UNAUTHORIZED = (
- keystoneclient.Unauthorized,
- cinderclient.Unauthorized,
- novaclient.Unauthorized,
- glanceclient.Unauthorized,
- neutronclient.Unauthorized,
- heatclient.HTTPUnauthorized,
- troveclient.Unauthorized,
-)
-
-
-NOT_FOUND = (
- keystoneclient.NotFound,
- cinderclient.NotFound,
- novaclient.NotFound,
- glanceclient.NotFound,
- neutronclient.NotFound,
- heatclient.HTTPNotFound,
- troveclient.NotFound,
-)
-
-
-# NOTE(gabriel): This is very broad, and may need to be dialed in.
-RECOVERABLE = (
- keystoneclient.ClientException,
- # AuthorizationFailure is raised when Keystone is "unavailable".
- keystoneclient.AuthorizationFailure,
- keystoneclient.Forbidden,
- cinderclient.ClientException,
- cinderclient.ConnectionError,
- cinderclient.Forbidden,
- novaclient.ClientException,
- novaclient.Forbidden,
- glanceclient.ClientException,
- neutronclient.Forbidden,
- neutronclient.NeutronClientException,
- swiftclient.ClientException,
- heatclient.HTTPForbidden,
- heatclient.HTTPException,
- troveclient.ClientException,
- saharaclient.APIException,
- requests.RequestException,
-)