blob: ff5b2cfa7b283842a45d576f1e6d5fa367af50b4 [file] [log] [blame]
Maru Newbyb096d9f2015-03-09 18:54:54 +00001# 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
Armando Migliaccio023d7f82016-02-25 12:21:24 -080016from tempest.lib import exceptions
Maru Newbyb096d9f2015-03-09 18:54:54 +000017
Assaf Mullerd22ca2e2016-01-19 11:47:14 -050018TempestException = exceptions.TempestException
Maru Newbyb096d9f2015-03-09 18:54:54 +000019
20
21class InvalidConfiguration(TempestException):
22 message = "Invalid Configuration"
23
24
25class InvalidCredentials(TempestException):
26 message = "Invalid Credentials"
27
28
29class InvalidServiceTag(TempestException):
30 message = "Invalid service tag"
Federico Ressi498a7f42018-10-22 17:44:11 +020031
32
33class SSHScriptException(exceptions.TempestException):
34 """Base class for SSH client execute_script() exceptions"""
35
36
37class SSHScriptTimeoutExpired(SSHScriptException):
38 message = ("Timeout expired while executing script on host %(host)r:\n"
39 "script:\n%(script)s\n"
40 "stderr:\n%(stderr)s\n"
41 "stdout:\n%(stdout)s\n"
42 "timeout: %(timeout)s")
43
44
45class SSHScriptFailed(SSHScriptException):
46 message = ("Failed executing script on remote host %(host)r:\n"
47 "script:\n%(script)s\n"
48 "stderr:\n%(stderr)s\n"
49 "stdout:\n%(stdout)s\n"
50 "exit_status: %(exit_status)s")