Is it possible with NCM to do a search and replace ?
What I would like to do is search for a string like "switchport voice vlan 420" in all the interfaces of a switch and replace it with another string like "switchport voice vlan 450".
Hi,
That would be a feature request.
Regards,
Jiri
Hi lalibertei,
NCM would be able to do something slightly different: configure all interfaces with something like "switchport voice vlan 450" (whether they have voice vlan 420 or not).
If this is acceptable, I can provide the details.
Thanks but I already know how to do that! I was really looking for a search and replace function.
That's what I've done!
You could do this with a programming language but you would have to do a bunch of steps, even if NCM created such a feature it would probably be bad to do.
You would have to sho run ip in bri, save the ints to a list, parse the list sho run int for each interface, match the ones that have the pattern and sub it out. It's just not a simple find and replace in the config unless you grep'd the text config and copied it over the running (which is seriously bad practice).