Hi all,
I need a bit of help to create a template whose job is to erase an username.
The problem is that on some switches when I write the command "no username old_user" the prompt asks for a confirmation with this question on the next line "This operation will remove all username related configurations with same name.Do you want to continue? [confirm]".
On others family of switches the question doesn't pop-up, you just need to press ENTER button, at the end of the line after the command "no username old_user", to confirm the intention to erase the username.
So my template doesn't work all the times, and I wonder if this one will work with any interactive question:
#INTERACTIVE
no username old_user
<IQ>[confirm]<R>y
#ENDS_INTERACTIVE
I cutted the first part of the question due to the "?" character, because <IQ> tag utilizes regular expressions for interactive questions. But then on other family of switches the question could be totally different.
Ultimately how could I do? Create several templates one for each switch family? Or is there a way to standardize everything, possibly without using phyton VTL. Taking into account that the work will also be done on many routers later.