tuskar-ui/tuskar_ui/exceptions.py
Dariusz Smigiel (dasm) 5f236273ec Handle traceback when Node is locked
When node is locked, any attempt to delete this node, is finished
with traceback. Add handling of exceptions to prevent this
situation.

Change-Id: Ie7b8c2c6575a104817c51016a8515b5533e4ca98
Closes-Bug: 1437236
2015-04-04 16:35:00 +02:00

23 lines
932 B
Python

#
# 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 ironicclient import exceptions as ironic_exceptions
from openstack_dashboard import exceptions
from tuskarclient.openstack.common.apiclient import exceptions as tuskarclient
NOT_FOUND = exceptions.NOT_FOUND
RECOVERABLE = exceptions.RECOVERABLE + (
ironic_exceptions.Conflict, tuskarclient.ClientException,
)
UNAUTHORIZED = exceptions.UNAUTHORIZED