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.
|
|
|
|
#
|
|
|
|
|
|
|
|
"""Exception definitions"""
|
|
|
|
|
|
|
|
|
2015-04-28 11:26:24 -05:00
|
|
|
class Timeout(Exception):
|
|
|
|
"""An operation timed out"""
|
2015-05-18 10:46:14 -04:00
|
|
|
|
|
|
|
|
2016-05-29 22:09:17 -04:00
|
|
|
class WorkflowServiceError(Exception):
|
|
|
|
"""The service type is unknown"""
|
2016-08-31 09:33:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
class WebSocketTimeout(Exception):
|
|
|
|
"""Timed out waiting for messages on the websocket"""
|
2016-05-29 22:09:17 -04:00
|
|
|
|
|
|
|
|
2015-05-18 10:46:14 -04:00
|
|
|
class NotFound(Exception):
|
|
|
|
"""Resource not found"""
|
2015-08-26 10:54:41 +02:00
|
|
|
|
|
|
|
|
2015-10-20 21:56:57 +00:00
|
|
|
class DeploymentError(RuntimeError):
|
2015-08-26 10:54:41 +02:00
|
|
|
"""Deployment failed"""
|
2015-09-09 14:02:32 +02:00
|
|
|
|
|
|
|
|
2016-11-17 11:43:36 +00:00
|
|
|
class StackInProgress(RuntimeError):
|
|
|
|
"""Unable to deploy as the stack is busy"""
|
|
|
|
|
|
|
|
|
2015-09-09 14:02:32 +02:00
|
|
|
class RootUserExecution(Exception):
|
|
|
|
"""Command was executed by a root user"""
|
2015-10-20 21:56:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
class InvalidConfiguration(ValueError):
|
|
|
|
"""Invalid parameters were specified for the deployment"""
|
2015-12-04 14:03:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
class IntrospectionError(RuntimeError):
|
|
|
|
"""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."""
|
|
|
|
|
|
|
|
|
2015-10-15 10:25:13 +02:00
|
|
|
class StateTransitionFailed(Exception):
|
|
|
|
"""Ironic node state transition failed"""
|
2015-11-26 15:19:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ProfileMatchingError(Exception):
|
|
|
|
"""Failed to validate or assign node profiles"""
|
2016-02-03 11:35:43 +00:00
|
|
|
|
|
|
|
|
2016-09-13 19:09:30 +01:00
|
|
|
class PlanCreationError(Exception):
|
|
|
|
"""Plan creation failed"""
|