Вы находитесь на странице: 1из 5

Spirent TestCenter Automation

HLTAPI for Perl (JT) Installation Guide

July 2015

PN 71-007608 Rev A

SPIRENT
27349 Agoura Road
Calabasas, CA 91301
USA

2015 Spirent. All Rights Reserved.


All of the company names and/or brand names and/or product names referred to in this document, in
particular, the name Spirent and its logo device, are either registered trademarks or trademarks of
Spirent plc and its subsidiaries, pending registration in accordance with relevant national laws. All other
registered trademarks or trademarks are the property of their respective owners.
The information contained in this document is subject to change without notice and does not represent a
commitment on the part of Spirent. The information in this document is believed to be accurate and reliable;
however, Spirent assumes no responsibility or liability for any errors or inaccuracies that may appear in the
document.

Table of Contents .
Overview............................................................................................................................... 2
Installing HLTAPI for Perl (JT) .............................................................................................. 2
Logs Generated .................................................................................................................... 3
Updating GA Release at the Production Path....................................................................... 3
Reference ............................................................................................................................. 3

Overview
HLTAPI for Perl (JT) is specially designed for Juniper users who would like to run HLTAPI for Perl in their
testing environment. This document describes how to configure and run scripts with HLTAPI for Perl (JT)

Installing HLTAPI for Perl (JT)


This document assumes that the Juniper Tools team has already deployed Spirent Test Center and Spirent
HLTAPI with HLTAPI for Perl components at the production path. Depending on how would you like to run the
scripts, you can configure HLTAPI for Perl (JT) as described below:
To run HLTAPI for Perl (JT) at the production path:
1.

Locate the following related components at the Juniper production path:


Spirent HLTAPI
/volume/labtools/lib/Spirent/HLTAPI/<HLTAPI_VERSION>/SourceCode
HLTAPI for Perl (JT) essentials (sth.pm, hltapiserver.srv) in the JT environment
/volume/labtools/lib/Spirent/HLTAPI/<HLTAPI_VERSION>/SourceCode/hltapiForPerl
SpirentHLTAPIforPerl.pm
/volume/labtools/lib/

2.

Define variable x-spirent-hltapi 1 in the .params file.


Based on this variable, JT loads Spirent HLTAPI for the Perl environment by calling function "new
SpirentHLTAPIforPerl().
For example:

rt0 {
system {
make "spirent";
x-spirent-hltapi 1;
}
}

Note: To run scripts on a specific version of Spirent HLTAPI, define variable SPIRENT_TAPI_VERSION
and specify a version. By default, the latest HLTAPI release will be used.
To run HLTAPI for Perl locally:
1.

Install Tcl, Perl and Spirent HLTAPI on your local machine.


For more information, please refer to the HLTAPI Environment Installation Guide.

2.

Define the following variables:


SPIRENT_HLTAPI_INSTALL_DIR: Path for HLTAPI source code.
SPIRENT_HLTAPI_FOR_PERL_DIR: Path for the following files:
SpirentHLTAPIforPerl.pm
sth.pm
hltapiserver.srv
Spirent Communications 2

Note: If you want to toggle back to the production environment, simply delete the environment variables
in step two, and follow the steps to run HLTAPI for Perl (JT) at the production path.

Logs Generated
The following log files are generated after you run a script named xxx:
These logs help in analyzing and debugging, if there are issues with HLTAPI for Perl scripts.

Console logs (<xxx>.<pid>.putlog)

HLT server log (<xxx>.<pid>.hltlog)

HLTAPI logs (sth::test_config)


<xxx>_logfile.txt
<xxx>_stcExport.txt
<xxx>_hltExport.txt
<xxx>_hlt2StcMapping.txt

Updating GA Release at the Production Path


These steps are intended for the Juniper Tools team as a general guide to update the HLTAPI GA at the
production path.
1.

From the HLTAPI GA folder, copy the HLTAPI source code folder - SourceCode to the following path:
/volume/labtools/lib/Spirent/HLTAPI/<HLTAPI_VERSION>/

2.

From SourceCode/hltapiforperl/, copy SpirentHLTAPIforPerl.pm to the following location and overwrite


the existing folder:
/volume/labtools/lib/

Reference
Spirent HLTAPI Environment Installation Guide

Spirent Communications 3

Вам также может понравиться