07-28-2022 02:54 PM
All, looking for some assistance with DNAC template scripting.
Cu has some 9800 WLCs where we want to use a custom template to edit the wireless flex profiles on it, removing the existing redirect acl (that's pushed by default DNAC settings) and applying an custom acl to it. So for all instances of:
wireless profile flex xxxx
acl-policy EXT_REDIRECT_ACL_xxxx
...blahblah...
We want to do a:
wireless profile flex xxxx
no acl-policy EXT_REDIRECT_ACL_xxxx
acl-policy CWA_REDIRECT
However the name of the profile and the name of the acl can be different for each site have, so they need a way to get that filled in using variables.
The DNAC UI menu lists Template System Variables for $__flexprofile and $__flexprofile.flexProfileName... would something like this work as a starting point?
#foreach( $flexprofile in $__flexprofile )
interface wireless profile flex $__flexprofile.flexProfileName
acl-policy CWA_REDIRECT
#end
Didn't find anything for acl-policy, so how can that be obtained for variable?
More details in TAC case 693696617 and example show run here: https://cxfiles-v1-ui.cxapps.cisco.com/files/download?appId=quicker&id=693696617&fileName=DNAC9800_HTMSP%20DEV_29Jun2022.txt
08-01-2022 11:55 AM
Current issue we're seeing with custom templates.
08-02-2022 11:31 AM
Cu has an answer for the issue with the AVC template, but we still need an answer for the original question. How can we apply the config for all flex profiles on the 9800?
wireless profile flex xxxx
acl-policy CWA_REDIRECT
08-04-2022 10:02 AM
For that matter, is there a resource where we can find the full list of available variables?
The config guide says "Many of these variables are available in the Template Editor drop-down list." which implies the list in the UI isn't all of the available variables: https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center/2-2-3/user_guide/b_cisco_dna_center_ug_2_2_3/b_cisco_dna_center_ug_2_2_3_chapter_01000.html#id_92757
Where can we find a comprehensive listing?
08-31-2022 01:39 PM - edited 08-31-2022 01:40 PM
I suggest you leverage the “Bind to source” feature in the template. This will allow you to pull in the flex profile names on all the controllers and apply your Config under them. I overwrite mine everytime I provision my controllers because of the sticky parameters that DNAC has to push out. I wish there was a way suppress this!! I feel your pain!
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