Hello,
I've wrote very simple script to rewrite IP address from vlan to management. It works as intended if executed from switch:
/code
enable cli scripting
disable clipaging
set var cli.out 0
sh vlan mana | i 172
set var ss $TCL(split ${cli.out} "\n")
set var IP $TCL(regexp -inline {(?:\d+\.){3}\d+} $ss)
#set var result $TCL(lindex $sline 3)
show var IP
configure vlan Mgmt ipaddress $IP 255.255.254.0
/code
Slot-1 D8_parter.4 # load script net.xsf
172.17.200.30
But when execute this one from XMC i got error:
javax.script.ScriptException:
*** Script Error ***
null
-> set ss $TCL(split ${cli.out} "\n")
It looks like variable cli.out is NOT set propertly.
Anyone has suggestion how to fix that ?
Also i see that XMC sends own scripts as files to execute on switch - vide nms.xsf, maybe that is a solution ?
Tomek