Printer FriendlyEmail Article Link

How can I force a user off, and reserve ports using Spirent TestCenter PERL API?

Answer

This is similar to TCL API and just a small syntax changes

 
In Tcl
1. Revoke the current user from the port
        stc::perform ReservePort -location //ChassisIp/Slot/Port  -RevokeOwner True
2. Release the port
        stc::release "ChassisIp/Slot/Port"
3. Reserve the port
        stc::reserve "ChassisIp/Slot/Port"
 
 
In Perl
1. Revoke the current user from the port
       $stc->perform("ReservePort",location=>"$chassisAddress/$slot/$p1", RevokeOwner=>"True");
2. Release the port
       $stc->release("$chassisAddress/$slot/$p1");
3. Reserve the port
       $stc->reserve("$chassisAddress/$slot/$p1");
 
 
Please see the attached sample for more detail (change the .txt to .pl to run the script)  
 
Attachments
Attachment


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