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

Cli Tempate help on creating port config.

I am trying to finish up this CLI Template and having a hard time get the correct syntax.

 

This works as to select the port but it also selects routed port, what I need to do is add another check that says if port is part of vlan 10 also select it. 

 

#if ($devicetype.toLowerCase().contains("3750"))
        #foreach ($Port in $PortList)
            #if ($Port.toLowerCase().contains("fastethernet"))
                interface $Port
                    "switch command goes here"
                 exit  
          #end
#end

 

I found the variable vlanid, but cannot seem to add to the existing command for sucess.
#end

1 Reply 1

Thnking something like this..

 

 

#if ($devicetype.toLowerCase().contains("3750"))&& ($vlanid() .contains ("100))
#foreach ($Port in $PortList)
#if ($Port.toLowerCase().contains("fastethernet"))
interface $Port
"switch command goes here"
exit
#end
#end
#end