3 # Copyright (c) 2016 Orange and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # This class defines Python OPNFV exceptions
14 class OPNFVException(Exception):
15 def __call__(self, *args):
16 return self.__class__(*(self.args + args))
19 # ************************************
21 # ************************************
22 class OPNFVSUTNotReachable(OPNFVException):
23 """Target System Under Test is not reachable"""
27 class OPNFVCiExecutionError(OPNFVException):
28 """Error occurs during CI exection"""
32 class TestDashboardError(OPNFVException):
33 """Impossible to report results to dashboard"""
37 class TestReportingError(OPNFVException):
38 """Impossible to report results to reporting"""
42 # ************************************
43 # Exceptions related to test DB
44 # ************************************
45 class TestDbNotReachable(OPNFVException):
46 """Test database is not reachable"""
50 class UnknownScenario(OPNFVException):
51 """Test scenario is unknown"""
55 class UnknownPod(OPNFVException):
56 """Test POD is unknown"""
60 class UnknownProject(OPNFVException):
61 """Project is unknown"""
65 class UnknownTestCase(OPNFVException):
66 """Test case is unknown"""
70 class UnknownVersion(OPNFVException):
71 """Version is unknown"""
75 class UnknownInstaller(OPNFVException):
76 """Installer is not supported"""
83 class FunctestExecutionError(OPNFVException):
84 """Internal Functest error"""
88 class YardstickExecutionError(OPNFVException):
89 """Internal Yardstick error"""
93 # **********************************
94 # Errors related to Feature projects
95 # **********************************
96 class TestCaseNotRunnable(OPNFVException):
97 """test case incompatible with SUT, scenario, installer"""
101 class FeatureTestIntegrationError(OPNFVException):
102 """Impossible to integrate Feature test"""
106 class FeatureTestExecutionError(OPNFVException):
107 """Error during Feature test execution"""
111 # *********************************
112 # Errors related to VNF on boarding
113 # *********************************
114 class VNFTestNotRunnable(OPNFVException):
115 """VNF test is not compatible with SUT, scenario, installer"""
119 class VNFIntegrationError(OPNFVException):
120 """Impossible to integrate the VNF test"""
124 class VNFExecutionError(OPNFVException):
125 """Error during VNF test execution"""