04-04-2023 12:05 AM
In our DNA Center we have a Day-N template for Interface Templates on Fabric Edge switches. These interface templates are dynamically called from ISE authorisation profiles to tweak interface parameters.
Now, when we need to remove or rename an interface template, we see that provisioning of the switch ends in a failed state when the to-be-removed template does not exist (anymore) on the switch.
Example:
switch(config)#no template whats-in-a-name
Template whats-in-a-name does not exist
Is there a way to tell DNA Center to ignore command output, when it's output is not relevant or can be ignored?
04-04-2023 08:39 AM
Try using the #Interactive macro as described here: https://blogs.cisco.com/developer/velocity-templates-in-dna-center-3
Though I'm not sure off the top of my head what that macro does when the "no template" command succeeds. Please let us know what your testing reveals.
04-05-2023 12:13 AM
Hi Preston,
I tried these three variants of the command:
#INTERACTIVE
no template whats-in-a-name
#END_INTERACTIVE
#INTERACTIVE
no template whats-in-a-name<R>
#END_INTERACTIVE
#INTERACTIVE
no template whats-in-a-name<R>y
#END_INTERACTIVE
All three still result in a failed provisioning. btw, the last variant renders to:
no template whats-in-a-namey <-- response character 'y' gets appended to the command.
And of course the full option:
#INTERACTIVE
no template whats-in-a-name<IQ>Template whats-in-a-name does not exist<R>y
#END_INTERACTIVE
Which also does not work (with or without the "y" character). The interpreter still doesn't treat the command output as being interactive.
Thank you for your suggestion, but no success.
Cheers,
Hans
04-05-2023 10:14 AM
Thanks for testing Hans. I don't know of any other Template Macros that could help in this case. I think the root of the problem is that this "no template" command is violating IOS Parser policy by printing it's friendly error. Please open a TAC Case so they can work with engineering on a suitable fix.
If your goal is to eliminate "template whats-in-a-name" no matter what, I think you could get around this problem by starting your DNA Template always creating a simple "template whats-in-a-name", so that you have something to delete in every case.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide