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

DNAC Template - Velocity script - working with bind to source

HansK_NL
Level 1
Level 1

I'm working on a template in DNAC 2.2.2.8, which allows me to work through all switches in a stack and all interfaces per stackmember and configure each interface. A stack contains between 1 and 4 switches.

 

Now, I want to add additional logic, so I can evaluate the state (trunk, description, VLAN number) of each interface in order to adjust the config, or to skip an interface all together.

 

So, when I am evaluating an interface for attributes such as trunkmode, keywords in the description or certain VLAN numbers configured on said interface, I think I can obtain those values using two different methods:

* "Multi select, bind to source" - I don't like this method because it requires me to pre-select all interfaces of interest before applying the template, which defies the intent of the programming.

* API call and template - use an API call to retrieve the properties of an interface.

 

The "Multi select, bind to source" method gives me an array of interfaces and properties. I can create a for loop that steps through all the interfaces in the array and test them for the properties I'm looking for.

 

But, is it possible to do a lookup of a certain interface within the array (based on portName attribute, e.g. gigabitethernet1/0/1) and then lookup the attributes I'm interested in (excel HLOOKUP and VLOOKUP functions)?

 

Is it possible (or roadmap) to create a "bind to source" array of all gigabitethernet [09]/0/[09][09] within a stack, with only the attributes I'm interested in? Let's call it: bulk-select (if an additional switch is added to the stack, all additional interfaces are selected auto-magically)

 

Is it at all possible to use API calls to retreive the attributes of an interface, or is it not recommended to do so (as it would bombard DNAC with API calls, if the template is provisioned on multiple stacks at once.

 

Who can point me in the right direction?

 

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: