aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/utils/exceptions.py
blob: 34f76370ec95284847f1179b9d8487f9767f2b15 (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
# Copyright (c) 2018-2020 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
"""Module to define pythonsdk-test exceptions."""

__author__ = ("Morgan Richomme <morgan.richomme@orange.com>")

class  OnapTestException(Exception):
    """Parent Class for all Onap Test Exceptions."""
    error_message='Generic OnapTest exception'

class TestConfigurationException(OnapTestException):
    """Raise when configuration of the use case is incomplete or buggy."""
    error_message='Configuration error'

class ServiceDistributionException(OnapTestException):
    """Service not properly distributed."""
    error_message='Service not well distributed'


class ServiceInstantiateException(OnapTestException):
    """Service cannot be instantiated."""
    error_message='Service instantiation error'


class ServiceCleanupException(OnapTestException):
    """Service cannot be cleaned."""
    error_message='Service not well cleaned up'


class VnfInstantiateException(OnapTestException):
    """VNF cannot be instantiated."""
    error_message='VNF instantiation error'


class VnfCleanupException(OnapTestException):
    """VNF cannot be cleaned."""
    error_message="VNF can't be cleaned"


class VfModuleInstantiateException(OnapTestException):
    """VF Module cannot be instantiated."""
    error_message='VF Module instantiation error'


class VfModuleCleanupException(OnapTestException):
    """VF Module cannot be cleaned."""
    error_message="VF Module can't be cleaned"


class NetworkInstantiateException(OnapTestException):
    """Network cannot be instantiated."""
    error_message='Network instantiation error'


class NetworkCleanupException(OnapTestException):
    """Network cannot be cleaned."""
    error_message="Network can't be cleaned"

class ProfileInformationException(OnapTestException):
    """Missing k8s profile information."""
    error_message='Missing k8s profile information'

class ProfileCleanupException(OnapTestException):
    """K8s profile cannot be cleaned."""
    error_message="Profile can't be cleaned"

class EnvironmentPreparationException(OnapTestException):
    """Test environment preparation exception."""
    error_message="Test can't be run properly due to preparation error"

class SubstepExecutionException(OnapTestException):
    """Exception raised if substep execution fails."""

class EnvironmentCleanupException(OnapTestException):
    """Test environment cleanup exception."""
    error_message="Test couldn't finish a cleanup"

class PolicyException(OnapTestException):
    """Policy exception."""
    error_message="Problem with policy module"

class DcaeException(OnapTestException):
    """DCAE exception."""
    error_message="Problem with DCAE module"