aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/utils/OPNFVExceptions.py
blob: 03b3ea981d0e45a2f7c772138eab62cbc91cce82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/env python

# Copyright (c) 2016 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
# This class defines Python OPNFV exceptions
#


class OPNFVException(Exception):
    def __call__(self, *args):
        return self.__class__(*(self.args + args))


# ************************************
# Generic
# ************************************
class OPNFVSUTNotReachable(OPNFVException):
    """Target System Under Test is not reachable"""
    pass


class OPNFVCiExecutionError(OPNFVException):
    """Error occurs during CI exection"""
    pass


class TestDashboardError(OPNFVException):
    """Impossible to report results to dashboard"""
    pass


class TestReportingError(OPNFVException):
    """Impossible to report results to reporting"""
    pass


# ************************************
# Exceptions related to test DB
# ************************************
class TestDbNotReachable(OPNFVException):
    """Test database is not reachable"""
    pass


class UnknownScenario(OPNFVException):
    """Test scenario is unknown"""
    pass


class UnknownPod(OPNFVException):
    """Test POD is unknown"""
    pass


class UnknownProject(OPNFVException):
    """Project is unknown"""
    pass


class UnknownTestCase(OPNFVException):
    """Test case is unknown"""
    pass


class UnknownVersion(OPNFVException):
    """Version is unknown"""
    pass


class UnknownInstaller(OPNFVException):
    """Installer is not supported"""
    pass


# *******************
# Test project errors
# *******************
class FunctestExecutionError(OPNFVException):
    """Internal Functest error"""
    pass


class YardstickExecutionError(OPNFVException):
    """Internal Yardstick error"""
    pass


# **********************************
# Errors related to Feature projects
# **********************************
class TestCaseNotRunnable(OPNFVException):
    """test case incompatible with SUT, scenario, installer"""
    pass


class FeatureTestIntegrationError(OPNFVException):
    """Impossible to integrate Feature test"""
    pass


class FeatureTestExecutionError(OPNFVException):
    """Error during Feature test execution"""
    pass


# *********************************
# Errors related to VNF on boarding
# *********************************
class VNFTestNotRunnable(OPNFVException):
    """VNF test is not compatible with SUT, scenario, installer"""
    pass


class VNFIntegrationError(OPNFVException):
    """Impossible to integrate the VNF test"""
    pass


class VNFExecutionError(OPNFVException):
    """Error during VNF test execution"""
    pass