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

Catalyst Center CLI Template for provisioning switches in stack

nsompura
Level 1
Level 1

I am trying to write a CLI Template using Velocity in Catalyst Center. I want it to run through a for loop for the amount of switches in switch stack (provided by the user, max up to 4), and provision the switches in the stack (switch x provision MODEL where x is an integer between 1 and 4, MODEL is the model of the switch). I want it so that the MODEL from the command above is obtained directly from the switch with no input from the user. If this is possible, how can I do it?

4 Replies 4

Torbjørn
VIP
VIP

You can use system variables to get the model, as long as this is not a Day-0 template. In the template editor there is a "system variables assistant" button that allows you to browse through what system variables are available. 

What are you trying to do with the stack switch count loop? This might be an okay way to achieve what you are looking for, but I suspect that there is a better solution to this if you provide us with some more context. 

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

I'm trying to setup a Day-N template so that when it is pushed down to the switch, it will configure the switch with those priority commands (as a part of a standard config). I am able to get the stack-power configured dynamically based on the number of switches (entered by the user during Provision process). I wanted to see if I could do the same with the provisioning of switches. For the variable for model, I was able to sort of narrow it down to Inventory -> Device -> platformID. But that just gives me something like "C9300-48P, C9300-48P". When I run the simulation with this setting, the command comes out to "switch 1 provision C9300-48P, C9300-48P".

I have been on paternal leave for quite a while now, so my memory of the exact UI workflows is fogging up a bit... Aren't you able to define which switch is highest priority as part of PNP provisioning?

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

I wanted to see if I can set the priorities through templates. we have a mixture of 9300 and 9300X switches in our environment, so i wanted to see if i can get the information needed through system variables. if not, i'm probably going to add the few options that we need in a drop down box. we can maybe keep adding or deleting as the company needs demand it