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

Template editor - Input form issue

lni1
Level 1
Level 1

Hello Community,

Hope you are all sound and safe!!

As old CiscoWorks users, we are doing an in depth POC with Cisco DNA to manage our Cisco network.

We are doing some tests with template editor/provisioning and encounter issues with input forms.

There is an input form for $devtype: integer, multiple entries, being 1 & 2

If 1 selected there are some configs changed on an IE3000 device, if 2 selected there are some configs changed on an C9200L device.

When we run a simulation, it never matches the if and elsif, it always falls back on the else branch. Already tried with integers, strings. 

Any ideas what could be the issue? 

 

Kind regards,

Lieven Stubbe

Belgian railways

 

#set ($port_nbr = 2)

#if($devtype == 1)
#foreach($port in [1..${port_nbr}])
interface Fa1/${port}
description "IE3000 Access port (changed by DNA)"
#end
#elseif($devtype == 2)
#foreach($port in [1..${port_nbr}])
interface Gi1/0/${port}
description "C9200L Access port (changed by DNA)"
#end
#else
description "Other device, nothing happens"
#end

1 Reply 1

Mike.Cifelli
VIP Alumni
VIP Alumni
I have seen something similar relating to utilizing APIs where they do not like the abbreviated interface names (types). Try running the test with the full interface name (ie-GigabitEthernet0/0). Please let us know if that makes a difference. HTH!

Review Cisco Networking for a $25 gift card