forked from kytos/mef_eline
-
Notifications
You must be signed in to change notification settings - Fork 9
/
exceptions.py
46 lines (25 loc) · 1.03 KB
/
exceptions.py
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
"""MEF Eline Exceptions."""
class MEFELineException(Exception):
"""MEF Eline Base Exception."""
class EVCException(MEFELineException):
"""EVC Exception."""
class ValidationException(EVCException):
"""Exception for validation errors."""
class FlowModException(MEFELineException):
"""Exception for FlowMod errors."""
class PathFinderException(MEFELineException):
"""Exception related to pathfinder request."""
class InvalidPath(MEFELineException):
"""Exception for invalid path."""
class DisabledSwitch(MEFELineException):
"""Exception for disabled switch in path"""
class EVCPathNotInstalled(MEFELineException):
"""Exception raised when a path was not installed properly."""
class ActivationError(EVCException):
"""Exception when an EVC couldn't get activated."""
class DuplicatedNoTagUNI(MEFELineException):
"""Exception for duplicated no TAG UNI"""
def __init__(self, msg: str) -> None:
self.msg = msg
def __repr__(self) -> str:
return f"DuplicatedNoTagUNI, {self.msg}"