cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
785
Views
0
Helpful
4
Replies

DNAC template scripting for wlan flex profile

liswu
Cisco Employee
Cisco Employee

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

 

4 Replies 4

liswu
Cisco Employee
Cisco Employee

Current issue we're seeing with custom templates.policyprofiles.png

liswu
Cisco Employee
Cisco Employee

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 

 

liswu
Cisco Employee
Cisco Employee

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?

usaf_27
Level 1
Level 1

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!