aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/utils/exceptions.py
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2023-07-17 13:30:55 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2023-07-17 13:50:59 +0000
commit939f1933c8635a18de428c696c97cc5d8600abff (patch)
treea58cb9342f1a9d2cec80fc6a792eae0daae7bc49 /src/onaptests/utils/exceptions.py
parentb1e1a5fa99e29b3ffc2bc48d11b163e28cbb7744 (diff)
Add pylama into checks
Checks code with pylama Issue-ID: INT-2222 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: If275ef90f21e3049abe72bcf373473b40846005c
Diffstat (limited to 'src/onaptests/utils/exceptions.py')
-rw-r--r--src/onaptests/utils/exceptions.py49
1 files changed, 30 insertions, 19 deletions
diff --git a/src/onaptests/utils/exceptions.py b/src/onaptests/utils/exceptions.py
index 51c56f6..6842714 100644
--- a/src/onaptests/utils/exceptions.py
+++ b/src/onaptests/utils/exceptions.py
@@ -8,85 +8,96 @@
__author__ = ("Morgan Richomme <morgan.richomme@orange.com>")
-class OnapTestException(Exception):
+
+class OnapTestException(Exception):
"""Parent Class for all Onap Test Exceptions."""
- error_message='Generic OnapTest exception'
+ error_message = 'Generic OnapTest exception'
+
class TestConfigurationException(OnapTestException):
"""Raise when configuration of the use case is incomplete or buggy."""
- error_message='Configuration error'
+ error_message = 'Configuration error'
+
class ServiceDistributionException(OnapTestException):
"""Service not properly distributed."""
- error_message='Service not well distributed'
+ error_message = 'Service not well distributed'
class ServiceInstantiateException(OnapTestException):
"""Service cannot be instantiated."""
- error_message='Service instantiation error'
+ error_message = 'Service instantiation error'
class ServiceCleanupException(OnapTestException):
"""Service cannot be cleaned."""
- error_message='Service not well cleaned up'
+ error_message = 'Service not well cleaned up'
class VnfInstantiateException(OnapTestException):
"""VNF cannot be instantiated."""
- error_message='VNF instantiation error'
+ error_message = 'VNF instantiation error'
class VnfCleanupException(OnapTestException):
"""VNF cannot be cleaned."""
- error_message="VNF can't be cleaned"
+ error_message = "VNF can't be cleaned"
class VfModuleInstantiateException(OnapTestException):
"""VF Module cannot be instantiated."""
- error_message='VF Module instantiation error'
+ error_message = 'VF Module instantiation error'
class VfModuleCleanupException(OnapTestException):
"""VF Module cannot be cleaned."""
- error_message="VF Module can't be cleaned"
+ error_message = "VF Module can't be cleaned"
class NetworkInstantiateException(OnapTestException):
"""Network cannot be instantiated."""
- error_message='Network instantiation error'
+ error_message = 'Network instantiation error'
class NetworkCleanupException(OnapTestException):
"""Network cannot be cleaned."""
- error_message="Network can't be cleaned"
+ error_message = "Network can't be cleaned"
+
class ProfileInformationException(OnapTestException):
"""Missing k8s profile information."""
- error_message='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"
+ 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"
+ 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"
+ error_message = "Test couldn't finish a cleanup"
+
class PolicyException(OnapTestException):
"""Policy exception."""
- error_message="Problem with policy module"
+ error_message = "Problem with policy module"
+
class DcaeException(OnapTestException):
"""DCAE exception."""
- error_message="Problem with DCAE module"
+ error_message = "Problem with DCAE module"
+
class StatusCheckException(OnapTestException):
"""Status Check exception."""
- error_message="Namespace status check has failed"
+ error_message = "Namespace status check has failed"