blob: f48d7ac05769d687e278de7aae6f05f897131ee7 [file] [log] [blame]
Matthew Treinish8bdf6e32014-04-03 11:49:14 -04001# Copyright 2012 OpenStack Foundation
2# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010016
17from tempest.lib import exceptions
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040018
19
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010020class InvalidServiceTag(exceptions.TempestException):
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040021 message = "Invalid service tag"
22
23
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010024class BuildErrorException(exceptions.TempestException):
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040025 message = "Server %(server_id)s failed to build and is in ERROR status"
26
27
Matt Riedemann13954352017-02-07 14:03:54 -050028class SnapshotNotFoundException(exceptions.TempestException):
29 message = "Server snapshot image %(image_id)s not found."
30
31
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010032class ImageKilledException(exceptions.TempestException):
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040033 message = "Image %(image_id)s 'killed' while waiting for '%(status)s'"
34
35
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010036class AddImageException(exceptions.TempestException):
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040037 message = "Image %(image_id)s failed to become ACTIVE in the allotted time"
38
39
lkuchlan52d7b0d2016-11-07 20:53:19 +020040class VolumeResourceBuildErrorException(exceptions.TempestException):
41 message = ("%(resource_name)s %(resource_id)s failed to build and is in "
42 "ERROR status")
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040043
44
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010045class VolumeRestoreErrorException(exceptions.TempestException):
Matt Riedemannf77e7dc2015-08-10 16:39:39 -070046 message = "Volume %(volume_id)s failed to restore and is in ERROR status"
47
48
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010049class StackBuildErrorException(exceptions.TempestException):
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040050 message = ("Stack %(stack_identifier)s is in %(stack_status)s status "
51 "due to '%(stack_status_reason)s'")
52
53
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010054class ServerUnreachable(exceptions.TempestException):
zhufl955f82b2016-07-22 11:14:34 +080055 message = ("Server %(server_id)s is not reachable via "
56 "the configured network")
Matthew Treinish8bdf6e32014-04-03 11:49:14 -040057
58
Andrea Frittoli (andreaf)940f8c62015-10-30 16:39:24 +090059# NOTE(andreaf) This exception is added here to facilitate the migration
Andrea Frittoli (andreaf)1370baf2016-04-29 14:26:22 -050060# of get_network_from_name and preprov_creds to tempest.lib, and it should
Andrea Frittoli (andreaf)940f8c62015-10-30 16:39:24 +090061# be migrated along with them
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010062class InvalidTestResource(exceptions.TempestException):
guo yunxian99debda2016-07-22 12:27:22 +080063 message = "%(name)s is not a valid %(type)s, or the name is ambiguous"
Andrea Frittoli (andreaf)940f8c62015-10-30 16:39:24 +090064
65
Andrea Frittoli (andreaf)af4f7cf2016-06-13 15:12:26 +010066class RFCViolation(exceptions.RestClientException):
Ken'ichi Ohmichi4ca14f62015-01-19 02:29:56 +000067 message = "RFC Violation"