Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 635 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 635 Bytes

cisco-iface-abbrev

Module to abbreviate and/or lengthen Cisco IOS interface names.

Functions

get_both(in_name)

Expands or shortens Cisco interface name given in in_name. Returns a tuple of short and long version.

>>> import cisco_iface_abbrev
>>> cisco_iface_abbrev.get_both('Te1/0/1')
('Te1/0/1', 'TenGigabitEthernet1/0/1')

get_short(in_name)

Returns the abbreviated name.

>>> import cisco_iface_abbrev
>>> cisco_iface_abbrev.get_short('Port-channel1')
'Po1'

get_long(in_name)

Returns the expanded name.

>>> import cisco_iface_abbrev
>>> cisco_iface_abbrev.get_long('Tu3')
'Tunnel3'