Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[NSM API] Sample test scripts

0

0

Article ID: KB12937 KB Last Updated: 21 Jun 2010Version: 2.0
Summary:
NSM2008.1r1 introduced a new Simple Object Access Protocol (SOAP) API functionality.  This article provide sample scripts that can be used to test the API functionality.
Symptoms:

Solution:
The sample scripts are available in a .tgz archive that can be downloaded here.  See NOTE below to see if port needs to be changed in sample script.

Please read file README.txt for additional information about the API functionality and script development.

The scripts available in the packages are:
address.pl
attack.pl
authserver.pl
device.pl
extpolicy.pl
job.pl
log.pl
nat.pl
policy.pl
schedule.pl
service.pl
user.pl
vlan.pl
vsys.pl
zone.pl

For every script the syntax is:

# perl <script>.pl
Usage : perl <script>.pl -s <HOST> -t <TESTCASE>

Where
<HOST> is the IP of the NSM server
<TESTCASE> is the number of the test to execute

Each script contains one or more testcase.  An understanding of Perl and the API functions is required to understand the script operation and expected output.


NOTE:

Please also be aware that the NSM software install on Linux and Solaris uses port 8443 by default.
NSMXpress uses port 443.

For NSMXpress compatibility, the sample script NSM.pm file must be changed to use port 443.
The file "NBI_Samples/MAIN/NSM.pm must be edited to use port 443 instead of port 8443.

use constant SOAP_PORT => '8443';         #SOAP Port for NSM server install.
use constant SOAP_PORT => '443';           #SOAP Port for NSMXpress install.



In case of problem, consult KB12931 - [NSM API] Common problems and troubleshooting

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search