2015-03-17 08:35:39 -04:00
|
|
|
# Copyright 2013 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.
|
|
|
|
#
|
|
|
|
|
2018-05-16 14:50:45 +02:00
|
|
|
|
2015-03-17 08:35:39 -04:00
|
|
|
"""Exception definitions"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class Base(Exception):
|
|
|
|
"""Base TripleO exception."""
|
|
|
|
|
|
|
|
|
|
|
|
class Timeout(Base):
|
2015-04-28 11:26:24 -05:00
|
|
|
"""An operation timed out"""
|
2015-05-18 10:46:14 -04:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class WorkflowServiceError(Base):
|
2016-05-29 22:09:17 -04:00
|
|
|
"""The service type is unknown"""
|
2016-08-31 09:33:07 +00:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class WebSocketTimeout(Base):
|
2016-08-31 09:33:07 +00:00
|
|
|
"""Timed out waiting for messages on the websocket"""
|
2016-05-29 22:09:17 -04:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class WebSocketConnectionClosed(Base):
|
2018-09-26 12:09:41 +02:00
|
|
|
"""Websocket connection is closed before wait for messages"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class NotFound(Base):
|
2015-05-18 10:46:14 -04:00
|
|
|
"""Resource not found"""
|
2015-08-26 10:54:41 +02:00
|
|
|
|
|
|
|
|
2019-04-25 15:38:41 -04:00
|
|
|
class LookupError(Base):
|
|
|
|
"""Lookup Error"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class DeploymentError(Base):
|
2015-08-26 10:54:41 +02:00
|
|
|
"""Deployment failed"""
|
2015-09-09 14:02:32 +02:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class PlanEnvWorkflowError(Base):
|
2017-06-15 00:42:24 -04:00
|
|
|
"""Plan Environment workflow has failed"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class StackInProgress(Base):
|
2016-11-17 11:43:36 +00:00
|
|
|
"""Unable to deploy as the stack is busy"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class RootUserExecution(Base):
|
2015-09-09 14:02:32 +02:00
|
|
|
"""Command was executed by a root user"""
|
2015-10-20 21:56:57 +00:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class InvalidConfiguration(Base, ValueError):
|
2015-10-20 21:56:57 +00:00
|
|
|
"""Invalid parameters were specified for the deployment"""
|
2015-12-04 14:03:15 +01:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class IntrospectionError(Base):
|
2015-12-04 14:03:15 +01:00
|
|
|
"""Introspection failed"""
|
2015-10-15 10:25:13 +02:00
|
|
|
|
|
|
|
|
2016-05-29 22:09:17 -04:00
|
|
|
class RegisterOrUpdateError(WorkflowServiceError):
|
|
|
|
"""Introspection failed"""
|
|
|
|
|
|
|
|
|
|
|
|
class NodeProvideError(WorkflowServiceError):
|
|
|
|
"""Node Provide failed."""
|
|
|
|
|
|
|
|
|
2016-07-20 14:13:58 +00:00
|
|
|
class NodeConfigurationError(WorkflowServiceError):
|
|
|
|
"""Node Configuration failed."""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class StateTransitionFailed(Base):
|
2015-10-15 10:25:13 +02:00
|
|
|
"""Ironic node state transition failed"""
|
2015-11-26 15:19:22 +01:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class ProfileMatchingError(Base):
|
2015-11-26 15:19:22 +01:00
|
|
|
"""Failed to validate or assign node profiles"""
|
2016-02-03 11:35:43 +00:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class PlanCreationError(Base):
|
2016-09-13 19:09:30 +01:00
|
|
|
"""Plan creation failed"""
|
2017-04-18 17:14:35 +02:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class PlanExportError(Base):
|
2017-04-18 17:14:35 +02:00
|
|
|
"""Plan export failed"""
|
2017-04-27 15:16:07 -04:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class WorkflowActionError(Base):
|
2017-04-27 15:16:07 -04:00
|
|
|
"""Workflow action failed"""
|
|
|
|
msg_format = "Action {} execution failed: {}"
|
|
|
|
|
2017-09-27 18:05:48 +02:00
|
|
|
def __init__(self, action='', output=''):
|
|
|
|
message = self.msg_format.format(action, output)
|
2017-04-27 15:16:07 -04:00
|
|
|
super(WorkflowActionError, self).__init__(message)
|
2016-11-30 15:34:41 -07:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class DownloadError(Base):
|
2016-11-30 15:34:41 -07:00
|
|
|
"""Download attempt failed"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class LogFetchError(Base):
|
2016-11-30 15:34:41 -07:00
|
|
|
"""Fetching logs failed"""
|
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class ContainerDeleteFailed(Base):
|
2016-11-30 15:34:41 -07:00
|
|
|
"""Container deletion failed"""
|
2018-07-26 16:27:54 +02:00
|
|
|
|
|
|
|
|
2019-04-11 13:05:10 +02:00
|
|
|
class UndercloudUpgradeNotConfirmed(Base):
|
2018-07-26 16:27:54 +02:00
|
|
|
"""Undercloud upgrade security question not confirmed."""
|
2019-07-09 13:52:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
class CellExportError(Base):
|
|
|
|
"""Cell export failed"""
|