-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move canonical_interface_name, base_interfaces to netutils (#1904)
Co-authored-by: itdependsnetworks <ken@celenza.org>
- Loading branch information
1 parent
7544274
commit 8e7d663
Showing
7 changed files
with
31 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,4 @@ | ||
base_interfaces = { | ||
"ATM": "ATM", | ||
"AT": "ATM", | ||
"B": "Bdi", | ||
"Bd": "Bdi", | ||
"Bdi": "Bdi", | ||
"EOBC": "EOBC", | ||
"EO": "EOBC", | ||
"Ethernet": "Ethernet", | ||
"Eth": "Ethernet", | ||
"eth": "Ethernet", | ||
"Et": "Ethernet", | ||
"et": "Ethernet", | ||
"FastEthernet": "FastEthernet", | ||
"FastEth": "FastEthernet", | ||
"FastE": "FastEthernet", | ||
"Fast": "FastEthernet", | ||
"Fas": "FastEthernet", | ||
"FE": "FastEthernet", | ||
"Fa": "FastEthernet", | ||
"fa": "FastEthernet", | ||
"Fddi": "Fddi", | ||
"FD": "Fddi", | ||
"FortyGigabitEthernet": "FortyGigabitEthernet", | ||
"FortyGigEthernet": "FortyGigabitEthernet", | ||
"FortyGigEth": "FortyGigabitEthernet", | ||
"FortyGigE": "FortyGigabitEthernet", | ||
"FortyGig": "FortyGigabitEthernet", | ||
"FGE": "FortyGigabitEthernet", | ||
"FO": "FortyGigabitEthernet", | ||
"Fo": "FortyGigabitEthernet", | ||
"FiftyGigabitEthernet": "FiftyGigabitEthernet", | ||
"FiftyGigEthernet": "FiftyGigabitEthernet", | ||
"FiftyGigEth": "FiftyGigabitEthernet", | ||
"FiftyGigE": "FiftyGigabitEthernet", | ||
"FI": "FiftyGigabitEthernet", | ||
"Fi": "FiftyGigabitEthernet", | ||
"fi": "FiftyGigabitEthernet", | ||
"GigabitEthernet": "GigabitEthernet", | ||
"GigEthernet": "GigabitEthernet", | ||
"GigEth": "GigabitEthernet", | ||
"GigE": "GigabitEthernet", | ||
"Gig": "GigabitEthernet", | ||
"GE": "GigabitEthernet", | ||
"Ge": "GigabitEthernet", | ||
"ge": "GigabitEthernet", | ||
"Gi": "GigabitEthernet", | ||
"gi": "GigabitEthernet", | ||
"HundredGigabitEthernet": "HundredGigabitEthernet", | ||
"HundredGigEthernet": "HundredGigabitEthernet", | ||
"HundredGigEth": "HundredGigabitEthernet", | ||
"HundredGigE": "HundredGigabitEthernet", | ||
"HundredGig": "HundredGigabitEthernet", | ||
"Hu": "HundredGigabitEthernet", | ||
"TwentyFiveGigabitEthernet": "TwentyFiveGigabitEthernet", | ||
"TwentyFiveGigEthernet": "TwentyFiveGigabitEthernet", | ||
"TwentyFiveGigEth": "TwentyFiveGigabitEthernet", | ||
"TwentyFiveGigE": "TwentyFiveGigabitEthernet", | ||
"TwentyFiveGig": "TwentyFiveGigabitEthernet", | ||
"TF": "TwentyFiveGigabitEthernet", | ||
"Tf": "TwentyFiveGigabitEthernet", | ||
"tf": "TwentyFiveGigabitEthernet", | ||
"TwoHundredGigabitEthernet": "TwoHundredGigabitEthernet", | ||
"TwoHundredGigEthernet": "TwoHundredGigabitEthernet", | ||
"TwoHundredGigEth": "TwoHundredGigabitEthernet", | ||
"TwoHundredGigE": "TwoHundredGigabitEthernet", | ||
"TwoHundredGig": "TwoHundredGigabitEthernet", | ||
"TH": "TwoHundredGigabitEthernet", | ||
"Th": "TwoHundredGigabitEthernet", | ||
"th": "TwoHundredGigabitEthernet", | ||
"FourHundredGigabitEthernet": "FourHundredGigabitEthernet", | ||
"FourHundredGigEthernet": "FourHundredGigabitEthernet", | ||
"FourHundredGigEth": "FourHundredGigabitEthernet", | ||
"FourHundredGigE": "FourHundredGigabitEthernet", | ||
"FourHundredGig": "FourHundredGigabitEthernet", | ||
"F": "FourHundredGigabitEthernet", | ||
"f": "FourHundredGigabitEthernet", | ||
"Loopback": "Loopback", | ||
"loopback": "Loopback", | ||
"Lo": "Loopback", | ||
"lo": "Loopback", | ||
"Management": "Management", | ||
"Mgmt": "Management", | ||
"mgmt": "Management", | ||
"Ma": "Management", | ||
"Management_short": "Ma", | ||
"MFR": "MFR", | ||
"Multilink": "Multilink", | ||
"Mu": "Multilink", | ||
"n": "nve", | ||
"nv": "nve", | ||
"nve": "nve", | ||
"PortChannel": "Port-channel", | ||
"Port-channel": "Port-channel", | ||
"Port-Channel": "Port-channel", | ||
"port-channel": "Port-channel", | ||
"po": "Port-channel", | ||
"Po": "Port-channel", | ||
"POS": "POS", | ||
"PO": "POS", | ||
"Serial": "Serial", | ||
"Se": "Serial", | ||
"S": "Serial", | ||
"TenGigabitEthernet": "TenGigabitEthernet", | ||
"TenGigEthernet": "TenGigabitEthernet", | ||
"TenGigEth": "TenGigabitEthernet", | ||
"TenGig": "TenGigabitEthernet", | ||
"TeGig": "TenGigabitEthernet", | ||
"Ten": "TenGigabitEthernet", | ||
"T": "TenGigabitEthernet", | ||
"Te": "TenGigabitEthernet", | ||
"te": "TenGigabitEthernet", | ||
"Tunnel": "Tunnel", | ||
"Tun": "Tunnel", | ||
"Tu": "Tunnel", | ||
"Twe": "TwentyFiveGigE", | ||
"Tw": "TwoGigabitEthernet", | ||
"Two": "TwoGigabitEthernet", | ||
"Virtual-Access": "Virtual-Access", | ||
"Vi": "Virtual-Access", | ||
"Virtual-Template": "Virtual-Template", | ||
"Vt": "Virtual-Template", | ||
"VLAN": "VLAN", | ||
"V": "VLAN", | ||
"Vl": "VLAN", | ||
"Wlan-GigabitEthernet": "Wlan-GigabitEthernet", | ||
} | ||
|
||
reverse_mapping = { | ||
"ATM": "At", | ||
"EOBC": "EO", | ||
"Ethernet": "Et", | ||
"FastEthernet": "Fa", | ||
"Fddi": "FD", | ||
"FortyGigabitEthernet": "Fo", | ||
"GigabitEthernet": "Gi", | ||
"HundredGigabitEthernet": "Hu", | ||
"Loopback": "Lo", | ||
"Management": "Ma", | ||
"MFR": "MFR", | ||
"Multilink": "Mu", | ||
"Port-channel": "Po", | ||
"POS": "PO", | ||
"Serial": "Se", | ||
"TenGigabitEthernet": "Te", | ||
"Tunnel": "Tu", | ||
"TwoGigabitEthernet": "Two", | ||
"TwentyFiveGigE": "Twe", | ||
"Virtual-Access": "Vi", | ||
"Virtual-Template": "Vt", | ||
"VLAN": "Vl", | ||
"Wlan-GigabitEthernet": "Wl-Gi", | ||
} | ||
# Do not remove the below imports, functions were moved to netutils, but to not | ||
# break backwards compatibility, these should remain | ||
from netutils.constants import BASE_INTERFACES as base_interfaces # noqa | ||
from netutils.constants import REVERSE_MAPPING as reverse_mapping # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.