forked from kytos-ng/mef_eline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
42 lines (23 loc) · 961 Bytes
/
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
"""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 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}"