netutils
netutils copied to clipboard
canonical interface
Environment
- Python version: 3.10
- netutils version: latest
Expected Behavior
convert Serial0/0/0:0 into Se0/0/0:0
Observed Behavior
Serial0/0/0:0 is missed
Steps to Reproduce
- abbreviated_interface_name("Serial0/0/0:0")
I would guess tripped up on colon.
This doesn't look to be an issue anymore.
>>> from netutils.interface import abbreviated_interface_name
>>> abbreviated_interface_name("Serial0/0/0:0")
'Se0/0/0:0'
>>>
We also have it in the abbreviated interface test
Checked the other way too just in case.
>>> from netutils.interface import canonical_interface_name
>>> canonical_interface_name("Se0/0/0:1")
'Serial0/0/0:1'
Fixed in #346 for future reference.