Customer Service Center
Home
Knowledge Base
Contact Support
License Activation
|
Contact Support
|
License Activation
|
Spirent KB Article
Doc ID: FAQ12011
Printer Friendly
Email Article Link
How do I copy to move the SUT information from an old TAS to a new TAS on Landslide?
Answer
We do not have a way to do that via GUI, SUTs have to be entered manually.
There is a workaround via TCL API, Tcl script that could login to one TAS, copy the SUTS and save them and then login to another TAS and create the same SUTs on a new TAS.
Please have a try the TCL script as below, if you have found any problem with the codes, please let me know.
################################################################################################################
set srcTAS 10.61.45.210 # source TAS ip
set srcUser yuan # source TAS username
set srcPass a1b2c3d4 # source TAS password
set dstTAS 10.61.38.130 # destination TAS ip
set dstUser sms # destination TAS username
set dstPass a1b2c3d4 # destination TAS password
set maxID 1000 # max sut id, how many suts in the source TAS? Assume the number is smaller than maxID
# Retrieve suts from source tas
ls::login $srcTAS $srcUser $srcPass
set sutlist ""
for {set i 1} {$i<=$maxID} {incr i} {
if ![catch {set sut [ls::query SutInfo -Id $i]}] {
lappend sutlist "[ls::get $sut]"
}
}
ls::logout
# Create suts in destination TAS
ls::login $dstTAS $dstUser $dstPass
set i 1
foreach sutinfo $sutlist {
set cmd "ls::create SutInfo"
foreach item $sutinfo {
set k [string tolower [lindex $item 0]]
set v [lindex $item 1]
if {![string equal -nocase $k LastSavedDate] && ![string equal -nocase $k id]} {
append cmd " -$k $v"
}
}
set sut [eval $cmd]
catch {ls::perform AddSut $sut}
incr i
}
puts "$i suts are moved from $srcTAS to $dstTAS"
################################################################################################################
Version
1.0
Publish Date
2012-06-18
Categories
Product : Landslide,Automation,TAS Manager,Tcl API
Related Articles