| Conditions | 1 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | """Module with identifier types for Links and Interfaces""" |
||
| 43 | 1 | @staticmethod |
|
| 44 | 1 | def intf_id_to_tuple(interface_id: str) -> Tuple[str, int]: |
|
| 45 | """Map interface id as a switch, port tuple.""" |
||
| 46 | 1 | values = interface_id.split(":") |
|
| 47 | 1 | switch_id = ":".join(values[:-1]) |
|
| 48 | 1 | port = int(values[-1]) |
|
| 49 | return switch_id, port |
||
| 50 |