Printer FriendlyEmail Article Link

How to find out test module info using Spirent TestCenter TCL API?

Answer

#!/bin/sh
# -*- tcl -*-

package require SpirentTestCenter

set ChassisIP "10.21.10.103"
stc::perform ChassisConnectCommand -HostName $ChassisIP
stc::apply

set phyMgr [stc::get system1 -children-physicalchassismanager]

set phyChassis [stc::get $phyMgr -children-physicalchassis]

set phyModulesList [stc::get $phyChassis -children-physicaltestmodule]

puts "Chassis Controller Version - [stc::get $phyChassis  -ControllerHwVersion]"
puts "Backplane Hardware Version - [stc::get $phyChassis  -BackplaneHwVersion]"
puts "Chassis Controller Serial# - [stc::get $phyChassis  -SerialNum]"
puts "\n"


foreach phy_modules $phyModulesList {
    
     puts "Model     - [stc::get $phy_modules -Model]"
     puts "PartNum   - [stc::get $phy_modules -PartNum]"
     puts "SerialNum - [stc::get $phy_modules -SerialNum]"
     puts "\n" 
}


stc::perform ChassisDisconnectAllCommand


 

Attachments

Product : Spirent TestCenter,L2-3,Automation,API