Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 1 | # Copyright 2014 Mirantis Inc. |
| 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 | |
Ben Swartzlander | 1c4ff52 | 2016-03-02 22:16:23 -0500 | [diff] [blame] | 16 | from tempest.lib import exceptions |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 17 | |
| 18 | |
| 19 | class ShareBuildErrorException(exceptions.TempestException): |
| 20 | message = "Share %(share_id)s failed to build and is in ERROR status" |
| 21 | |
| 22 | |
| 23 | class ShareInstanceBuildErrorException(exceptions.TempestException): |
| 24 | message = "Share instance %(id)s failed to build and is in ERROR status" |
| 25 | |
| 26 | |
Andrew Kerr | bf31e91 | 2015-07-29 10:39:38 -0400 | [diff] [blame] | 27 | class ConsistencyGroupBuildErrorException(exceptions.TempestException): |
| 28 | message = ("Consistency group %(consistency_group_id)s failed to build " |
| 29 | "and is in ERROR status") |
| 30 | |
| 31 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 32 | class AccessRuleBuildErrorException(exceptions.TempestException): |
| 33 | message = "Share's rule with id %(rule_id)s is in ERROR status" |
| 34 | |
| 35 | |
| 36 | class SnapshotBuildErrorException(exceptions.TempestException): |
| 37 | message = "Snapshot %(snapshot_id)s failed to build and is in ERROR status" |
| 38 | |
| 39 | |
Andrew Kerr | bf31e91 | 2015-07-29 10:39:38 -0400 | [diff] [blame] | 40 | class CGSnapshotBuildErrorException(exceptions.TempestException): |
| 41 | message = ("CGSnapshot %(cgsnapshot_id)s failed to build and is in ERROR " |
| 42 | "status") |
| 43 | |
| 44 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 45 | class ShareProtocolNotSpecified(exceptions.TempestException): |
| 46 | message = "Share can not be created, share protocol is not specified" |
| 47 | |
| 48 | |
| 49 | class ShareNetworkNotSpecified(exceptions.TempestException): |
| 50 | message = "Share can not be created, share network not specified" |
| 51 | |
| 52 | |
| 53 | class NoAvailableNetwork(exceptions.TempestException): |
| 54 | message = "No available network for service VM" |
| 55 | |
| 56 | |
| 57 | class InvalidResource(exceptions.TempestException): |
| 58 | message = "Provided invalid resource: %(message)s" |
| 59 | |
| 60 | |
Rodrigo Barbieri | b7137ad | 2015-09-06 22:53:16 -0300 | [diff] [blame] | 61 | class ShareMigrationException(exceptions.TempestException): |
| 62 | message = ("Share %(share_id)s failed to migrate from " |
| 63 | "host %(src)s to host %(dest)s.") |
| 64 | |
| 65 | |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 66 | class ResourceReleaseFailed(exceptions.TempestException): |
| 67 | message = "Failed to release resource '%(res_type)s' with id '%(res_id)s'." |
Yogesh | bdb8810 | 2015-09-29 23:41:02 -0400 | [diff] [blame^] | 68 | |
| 69 | |
| 70 | class ShareReplicationTypeException(exceptions.TempestException): |
| 71 | message = ("Option backend_replication_type is set to incorrect value: " |
| 72 | "%(replication_type)s") |