| 1 |
# The contents of this file are licensed under the Apache License, Version 2.0 |
| 2 |
# (the "License"); you may not use this file except in compliance with the |
| 3 |
# License. You may obtain a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 |
# License for the specific language governing permissions and limitations under |
| 11 |
# the License. |
| 12 |
|
| 13 |
base_interfaces = { |
| 14 |
"ATM": "ATM", |
| 15 |
"AT": "ATM", |
| 16 |
"B": "Bdi", |
| 17 |
"Bd": "Bdi", |
| 18 |
"Bdi": "Bdi", |
| 19 |
"EOBC": "EOBC", |
| 20 |
"EO": "EOBC", |
| 21 |
"Ethernet": "Ethernet", |
| 22 |
"Eth": "Ethernet", |
| 23 |
"eth": "Ethernet", |
| 24 |
"Et": "Ethernet", |
| 25 |
"et": "Ethernet", |
| 26 |
"FastEthernet": "FastEthernet", |
| 27 |
"FastEth": "FastEthernet", |
| 28 |
"FastE": "FastEthernet", |
| 29 |
"Fast": "FastEthernet", |
| 30 |
"Fas": "FastEthernet", |
| 31 |
"FE": "FastEthernet", |
| 32 |
"Fa": "FastEthernet", |
| 33 |
"fa": "FastEthernet", |
| 34 |
"Fddi": "Fddi", |
| 35 |
"FD": "Fddi", |
| 36 |
"FortyGigabitEthernet": "FortyGigabitEthernet", |
| 37 |
"FortyGigEthernet": "FortyGigabitEthernet", |
| 38 |
"FortyGigEth": "FortyGigabitEthernet", |
| 39 |
"FortyGigE": "FortyGigabitEthernet", |
| 40 |
"FortyGig": "FortyGigabitEthernet", |
| 41 |
"FGE": "FortyGigabitEthernet", |
| 42 |
"FO": "FortyGigabitEthernet", |
| 43 |
"Fo": "FortyGigabitEthernet", |
| 44 |
"FiftyGigabitEthernet": "FiftyGigabitEthernet", |
| 45 |
"FiftyGigEthernet": "FiftyGigabitEthernet", |
| 46 |
"FiftyGigEth": "FiftyGigabitEthernet", |
| 47 |
"FiftyGigE": "FiftyGigabitEthernet", |
| 48 |
"FI": "FiftyGigabitEthernet", |
| 49 |
"Fi": "FiftyGigabitEthernet", |
| 50 |
"fi": "FiftyGigabitEthernet", |
| 51 |
"GigabitEthernet": "GigabitEthernet", |
| 52 |
"GigEthernet": "GigabitEthernet", |
| 53 |
"GigEth": "GigabitEthernet", |
| 54 |
"GigE": "GigabitEthernet", |
| 55 |
"Gig": "GigabitEthernet", |
| 56 |
"GE": "GigabitEthernet", |
| 57 |
"Ge": "GigabitEthernet", |
| 58 |
"ge": "GigabitEthernet", |
| 59 |
"Gi": "GigabitEthernet", |
| 60 |
"gi": "GigabitEthernet", |
| 61 |
"HundredGigabitEthernet": "HundredGigabitEthernet", |
| 62 |
"HundredGigEthernet": "HundredGigabitEthernet", |
| 63 |
"HundredGigEth": "HundredGigabitEthernet", |
| 64 |
"HundredGigE": "HundredGigabitEthernet", |
| 65 |
"HundredGig": "HundredGigabitEthernet", |
| 66 |
"Hu": "HundredGigabitEthernet", |
| 67 |
"TwentyFiveGigabitEthernet": "TwentyFiveGigabitEthernet", |
| 68 |
"TwentyFiveGigEthernet": "TwentyFiveGigabitEthernet", |
| 69 |
"TwentyFiveGigEth": "TwentyFiveGigabitEthernet", |
| 70 |
"TwentyFiveGigE": "TwentyFiveGigabitEthernet", |
| 71 |
"TwentyFiveGig": "TwentyFiveGigabitEthernet", |
| 72 |
"TF": "TwentyFiveGigabitEthernet", |
| 73 |
"Tf": "TwentyFiveGigabitEthernet", |
| 74 |
"tf": "TwentyFiveGigabitEthernet", |
| 75 |
"TwoHundredGigabitEthernet": "TwoHundredGigabitEthernet", |
| 76 |
"TwoHundredGigEthernet": "TwoHundredGigabitEthernet", |
| 77 |
"TwoHundredGigEth": "TwoHundredGigabitEthernet", |
| 78 |
"TwoHundredGigE": "TwoHundredGigabitEthernet", |
| 79 |
"TwoHundredGig": "TwoHundredGigabitEthernet", |
| 80 |
"TH": "TwoHundredGigabitEthernet", |
| 81 |
"Th": "TwoHundredGigabitEthernet", |
| 82 |
"th": "TwoHundredGigabitEthernet", |
| 83 |
"FourHundredGigabitEthernet": "FourHundredGigabitEthernet", |
| 84 |
"FourHundredGigEthernet": "FourHundredGigabitEthernet", |
| 85 |
"FourHundredGigEth": "FourHundredGigabitEthernet", |
| 86 |
"FourHundredGigE": "FourHundredGigabitEthernet", |
| 87 |
"FourHundredGig": "FourHundredGigabitEthernet", |
| 88 |
"F": "FourHundredGigabitEthernet", |
| 89 |
"f": "FourHundredGigabitEthernet", |
| 90 |
"Loopback": "Loopback", |
| 91 |
"loopback": "Loopback", |
| 92 |
"Lo": "Loopback", |
| 93 |
"lo": "Loopback", |
| 94 |
"Management": "Management", |
| 95 |
"Mgmt": "Management", |
| 96 |
"mgmt": "Management", |
| 97 |
"Ma": "Management", |
| 98 |
"Management_short": "Ma", |
| 99 |
"MFR": "MFR", |
| 100 |
"Multilink": "Multilink", |
| 101 |
"Mu": "Multilink", |
| 102 |
"n": "nve", |
| 103 |
"nv": "nve", |
| 104 |
"nve": "nve", |
| 105 |
"PortChannel": "Port-channel", |
| 106 |
"Port-channel": "Port-channel", |
| 107 |
"Port-Channel": "Port-channel", |
| 108 |
"port-channel": "Port-channel", |
| 109 |
"po": "Port-channel", |
| 110 |
"Po": "Port-channel", |
| 111 |
"POS": "POS", |
| 112 |
"PO": "POS", |
| 113 |
"Serial": "Serial", |
| 114 |
"Se": "Serial", |
| 115 |
"S": "Serial", |
| 116 |
"TenGigabitEthernet": "TenGigabitEthernet", |
| 117 |
"TenGigEthernet": "TenGigabitEthernet", |
| 118 |
"TenGigEth": "TenGigabitEthernet", |
| 119 |
"TenGig": "TenGigabitEthernet", |
| 120 |
"TeGig": "TenGigabitEthernet", |
| 121 |
"Ten": "TenGigabitEthernet", |
| 122 |
"T": "TenGigabitEthernet", |
| 123 |
"Te": "TenGigabitEthernet", |
| 124 |
"te": "TenGigabitEthernet", |
| 125 |
"Tunnel": "Tunnel", |
| 126 |
"Tun": "Tunnel", |
| 127 |
"Tu": "Tunnel", |
| 128 |
"Twe": "TwentyFiveGigE", |
| 129 |
"Tw": "TwoGigabitEthernet", |
| 130 |
"Two": "TwoGigabitEthernet", |
| 131 |
"Virtual-Access": "Virtual-Access", |
| 132 |
"Vi": "Virtual-Access", |
| 133 |
"Virtual-Template": "Virtual-Template", |
| 134 |
"Vt": "Virtual-Template", |
| 135 |
"VLAN": "VLAN", |
| 136 |
"V": "VLAN", |
| 137 |
"Vl": "VLAN", |
| 138 |
"Wlan-GigabitEthernet": "Wlan-GigabitEthernet", |
| 139 |
} |
| 140 |
|
| 141 |
reverse_mapping = { |
| 142 |
"ATM": "At", |
| 143 |
"EOBC": "EO", |
| 144 |
"Ethernet": "Et", |
| 145 |
"FastEthernet": "Fa", |
| 146 |
"Fddi": "FD", |
| 147 |
"FortyGigabitEthernet": "Fo", |
| 148 |
"GigabitEthernet": "Gi", |
| 149 |
"HundredGigabitEthernet": "Hu", |
| 150 |
"Loopback": "Lo", |
| 151 |
"Management": "Ma", |
| 152 |
"MFR": "MFR", |
| 153 |
"Multilink": "Mu", |
| 154 |
"Port-channel": "Po", |
| 155 |
"POS": "PO", |
| 156 |
"Serial": "Se", |
| 157 |
"TenGigabitEthernet": "Te", |
| 158 |
"Tunnel": "Tu", |
| 159 |
"TwoGigabitEthernet": "Two", |
| 160 |
"TwentyFiveGigE": "Twe", |
| 161 |
"Virtual-Access": "Vi", |
| 162 |
"Virtual-Template": "Vt", |
| 163 |
"VLAN": "Vl", |
| 164 |
"Wlan-GigabitEthernet": "Wl-Gi", |
| 165 |
} |