1 # Copyright (c) 2018-2020 Orange and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 """Module to define pythonsdk-test exceptions."""
9 __author__ = ("Morgan Richomme <morgan.richomme@orange.com>")
11 class OnapTestException(Exception):
12 """Parent Class for all Onap Test Exceptions."""
13 error_message='Generic OnapTest exception'
15 class TestConfigurationException(OnapTestException):
16 """Raise when configutation of the use cases is not complete or buggy."""
17 error_message='Configuration error'
19 class ServiceDistributionException(OnapTestException):
20 """Service not properly distributed."""
21 error_message='Service not well distributed'
24 class ServiceInstantiateException(OnapTestException):
25 """Service cannot be instantiated."""
26 error_message='Service instantiation error'
29 class ServiceCleanupException(OnapTestException):
30 """Service cannot be cleaned."""
31 error_message='Service not well cleaned up'
34 class VnfInstantiateException(OnapTestException):
35 """VNF cannot be instantiated."""
36 error_message='VNF instantiation error'
39 class VnfCleanupException(OnapTestException):
40 """VNF cannot be cleaned."""
41 error_message="VNF can't be cleaned"
44 class VfModuleInstantiateException(OnapTestException):
45 """VF Module cannot be instantiated."""
46 error_message='VF Module instantiation error'
49 class VfModuleCleanupException(OnapTestException):
50 """VF Module cannot be cleaned."""
51 error_message="VF Module can't be cleaned"
54 class NetworkInstantiateException(OnapTestException):
55 """Network cannot be instantiate."""
56 error_message='Network instantiation error'
59 class NetworkCleanupException(OnapTestException):
60 """Network cannot be cleaned."""
61 error_message="Network can't be cleaned"
63 class ProfileInformationException(OnapTestException):
64 """Missing k8s profile information."""
65 error_message='"Missing k8s profile information'
67 class ProfileCleanupException(OnapTestException):
68 """K8s profile cannot be cleaned."""
69 error_message="Profile can't be cleaned"