Display port numbers discreetly in config and not in ranges
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
01-31-2017 01:30 PM
My turn to ask a question
I’m mocking up a customer environment in our lab ( as I frequently do ).
Typically the hardware in the lab does not exactly match thecustomer environment thus I have to Change the port numbers to match lab gear
For example 3:4 might need to be 1
Search and replace might seem like an obvious solution except
I run into a problems were the ports numbers are described as ranges.
configure vlan NTVLAN add ports 3:1-4, 8:21-22, 8:45-46,9:45 tagged
does anyone know a way around this ? this is problem becausea customer may have 100s of vlans on many switches and I’m currently unable toautomate this process. If the config wasdisplayed with each port number discreetlyI could search and replace is there anyway to get it to display in this format?
I’m mocking up a customer environment in our lab ( as I frequently do ).
Typically the hardware in the lab does not exactly match thecustomer environment thus I have to Change the port numbers to match lab gear
For example 3:4 might need to be 1
Search and replace might seem like an obvious solution except
I run into a problems were the ports numbers are described as ranges.
configure vlan NTVLAN add ports 3:1-4, 8:21-22, 8:45-46,9:45 tagged
does anyone know a way around this ? this is problem becausea customer may have 100s of vlans on many switches and I’m currently unable toautomate this process. If the config wasdisplayed with each port number discreetlyI could search and replace is there anyway to get it to display in this format?
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
02-01-2017 02:51 PM
I've posted Oscar's script to GitHub. It works a bit differently than others there, in that it requires a webserver to run. It won't run directly on the switch.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/convert_port_config
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/convert_port_config
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
01-31-2017 01:44 PM
thanks Oscar , I sort of suspected you might have something as you guys must
do this so much.
do this so much.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
01-31-2017 01:42 PM
I created for lab purposes just that what you want, take a customers config and change ports to match my switch I am using. It is written in python. I can send it to you, you only need to adjust it if you dont want to use a webserver to run it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
01-31-2017 01:37 PM
I don't know how helpful it will be, but there's a Python script on our GitHub page that effectively does the opposite of this. It converts a non-stacking config into one that uses slot:port notation.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...
It may give you some ideas on how to "undo" that with your own script to output a config section in the way you need them to be displayed.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...
It may give you some ideas on how to "undo" that with your own script to output a config section in the way you need them to be displayed.
