Monday, November 27, 2017

TCL script to download and install EXOS multiple times

This is an UPM script using TCL and configuration on EXOS to trigger this UPM script. The purpose of this script is upgrading EXOS repeatedly to see whether there is any issue during EXOS upgrade.

[ upgrade.xsf ]
set var temp $TCL(after [expr 60 * 1000])
set var cli.out " "
show switch | in Image
set var output $TCL(split ${cli.out} "\n")
set var line $TCL(lindex $output 1)
set var split0 $TCL(split $line ":")
set var partition $TCL(lindex $split0 1)
set var TF $TCL(lsearch $partition *primary* )
if ($TF) then
 download image 10.67.55.52 summitX-15.6.4.2-patch1-6.xos vr "VR-Mgmt" primary
elseif
 download image 10.67.55.52 summitX-15.6.4.2-patch1-6.xos vr "VR-Mgmt" secondary
endif
reboot
[ config ]
create log filter testfilter
configure log filter testfilter add events HAL.Card.Info match string "Switch is operational"
create log target upm test
configure log target upm test filter testfilter severity Info
enable log target upm
create upm profile test
load script upgrade.xsf
.
configure upm profile test maximum execution-time 600
configure vlan mgmt ipaddress y.y.y.y
configure syslog add x.x.x.x:514 vr VR-Mgmt local1
enable log target syslog x.x.x.x:514 vr VR-Mgmt local1

No comments:

Post a Comment