Customer Service Center
Home
Knowledge Base
Forums
Contact Support
License Activation
|
Contact Support
|
License Activation
|
Spirent KB Article
Doc ID: FAQ17468
Printer Friendly
Email Article Link
Spirent TestCenter-JTAPI:How to reserve more ports than in XML?
Environment/Versions
Spirent TestCenter
Automation-JTAPI
Answer
Below is the code:
# Initialise the ports.
my $port1 = "10.61.39.164/10/1";
my $port2 = "10.61.39.164/10/2";
my $port3 = "10.61.39.164/10/3";
my $port4 = "10.61.39.164/10/4";
my @ports = (
{ port=>"$port1"},
{ port=>"$port2"},
{ port=>"$port3"},
{ port=>"$port4"}
);
my @extraports = (
{ port=>"$port3"},
{ port=>"$port4"}
);
# Lets create a new RT session.
my $rt = new Spirent(host=>"10.61.39.164");
my $loading_xml1g = $rt->load_xml(xmlfile=>"raw_streamblock1.xml");
if ($loading_xml1g eq ""){
print " <error> XML wasn't loaded properly \n";
$rt->close();
exit ();
}else{
print "XML was loaded properly \n";
}
$rt->add_ports(ports => \@extraports);
$rt->init_modules(port=>\@ports, arp=>0);
Version
1.0
Publish Date
2016-07-07
Categories
Product : Automation,API,Spirent TestCenter
Related Articles