Total Complexity | 2 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 92.86% |
Changes | 0 |
1 | """MEF Eline Exceptions.""" |
||
2 | |||
3 | |||
4 | 1 | class MEFELineException(Exception): |
|
5 | """MEF Eline Base Exception.""" |
||
6 | |||
7 | |||
8 | 1 | class EVCException(MEFELineException): |
|
9 | """EVC Exception.""" |
||
10 | |||
11 | |||
12 | 1 | class ValidationException(EVCException): |
|
13 | """Exception for validation errors.""" |
||
14 | |||
15 | |||
16 | 1 | class FlowModException(MEFELineException): |
|
17 | """Exception for FlowMod errors.""" |
||
18 | |||
19 | |||
20 | 1 | class PathFinderException(MEFELineException): |
|
21 | """Exception related to pathfinder request.""" |
||
22 | |||
23 | |||
24 | 1 | class InvalidPath(MEFELineException): |
|
25 | """Exception for invalid path.""" |
||
26 | |||
27 | |||
28 | 1 | class DisabledSwitch(MEFELineException): |
|
29 | """Exception for disabled switch in path""" |
||
30 | |||
31 | |||
32 | 1 | class EVCPathNotInstalled(MEFELineException): |
|
33 | """Exception raised when a path was not installed properly.""" |
||
34 | |||
35 | |||
36 | 1 | class ActivationError(EVCException): |
|
37 | """Exception when an EVC couldn't get activated.""" |
||
38 | |||
39 | |||
40 | 1 | class DuplicatedNoTagUNI(MEFELineException): |
|
41 | """Exception for duplicated no TAG UNI""" |
||
42 | 1 | def __init__(self, msg: str) -> None: |
|
43 | 1 | self.msg = msg |
|
44 | |||
45 | 1 | def __repr__(self) -> str: |
|
46 | return f"DuplicatedNoTagUNI, {self.msg}" |
||
47 |