2012-08-05 12:52:21 -07:00
|
|
|
# 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.
|
|
|
|
|
2012-08-13 18:28:42 -07:00
|
|
|
from cinderclient import exceptions as cinderclient
|
2012-08-05 12:52:21 -07:00
|
|
|
from glanceclient.common import exceptions as glanceclient
|
2013-03-18 16:21:49 +13:00
|
|
|
from heatclient import exc as heatclient
|
2012-08-05 12:52:21 -07:00
|
|
|
from keystoneclient import exceptions as keystoneclient
|
2013-07-02 23:37:35 -04:00
|
|
|
from neutronclient.common import exceptions as neutronclient
|
2012-08-05 12:52:21 -07:00
|
|
|
from novaclient import exceptions as novaclient
|
2014-07-10 11:28:06 -05:00
|
|
|
from requests import exceptions as requests
|
2014-04-10 12:28:28 -04:00
|
|
|
from saharaclient.api import base as saharaclient
|
2012-08-12 21:27:21 -07:00
|
|
|
from swiftclient import client as swiftclient
|
2013-10-17 08:50:32 -05:00
|
|
|
from troveclient import exceptions as troveclient
|
2012-08-05 12:52:21 -07:00
|
|
|
|
|
|
|
|
2013-10-17 08:50:32 -05:00
|
|
|
UNAUTHORIZED = (
|
|
|
|
keystoneclient.Unauthorized,
|
|
|
|
cinderclient.Unauthorized,
|
|
|
|
novaclient.Unauthorized,
|
|
|
|
glanceclient.Unauthorized,
|
|
|
|
neutronclient.Unauthorized,
|
|
|
|
heatclient.HTTPUnauthorized,
|
|
|
|
troveclient.Unauthorized,
|
|
|
|
)
|
2012-08-05 12:52:21 -07:00
|
|
|
|
|
|
|
|
2013-10-17 08:50:32 -05:00
|
|
|
NOT_FOUND = (
|
|
|
|
keystoneclient.NotFound,
|
|
|
|
cinderclient.NotFound,
|
|
|
|
novaclient.NotFound,
|
|
|
|
glanceclient.NotFound,
|
2014-03-23 06:46:05 +09:00
|
|
|
neutronclient.NotFound,
|
2013-10-17 08:50:32 -05:00
|
|
|
heatclient.HTTPNotFound,
|
|
|
|
troveclient.NotFound,
|
|
|
|
)
|
|
|
|
|
2013-09-13 12:05:31 +02:00
|
|
|
|
2013-10-17 08:50:32 -05:00
|
|
|
# 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,
|
2014-03-31 13:39:45 +02:00
|
|
|
keystoneclient.Forbidden,
|
2013-10-17 08:50:32 -05:00
|
|
|
cinderclient.ClientException,
|
|
|
|
cinderclient.ConnectionError,
|
2014-03-31 13:39:45 +02:00
|
|
|
cinderclient.Forbidden,
|
2013-10-17 08:50:32 -05:00
|
|
|
novaclient.ClientException,
|
2014-03-31 13:39:45 +02:00
|
|
|
novaclient.Forbidden,
|
2013-10-17 08:50:32 -05:00
|
|
|
glanceclient.ClientException,
|
2014-03-31 13:39:45 +02:00
|
|
|
neutronclient.Forbidden,
|
2013-10-17 08:50:32 -05:00
|
|
|
neutronclient.NeutronClientException,
|
|
|
|
swiftclient.ClientException,
|
2014-03-31 13:39:45 +02:00
|
|
|
heatclient.HTTPForbidden,
|
2013-10-17 08:50:32 -05:00
|
|
|
heatclient.HTTPException,
|
2014-04-10 12:28:28 -04:00
|
|
|
troveclient.ClientException,
|
|
|
|
saharaclient.APIException,
|
2014-07-10 11:28:06 -05:00
|
|
|
requests.RequestException,
|
2013-10-17 08:50:32 -05:00
|
|
|
)
|