Perl Scripts - Dell OpenManage Network Manager Client Manual

Web client guide 5.1
Hide thumbs Also See for OpenManage Network Manager:
Table of Contents

Advertisement

Perl Scripts

This section describes the details of using Perl scripts within Adaptive CLI. See Using Perl in
Adaptive CLI on page 342 for more about why to use Perl.
The Perl output goes to the selected target device. Typically, this means creating lines like the
following:
println("show $param");
or
print("show $param\n");
You must specify parameters within the script (like $param) in the screen described in Attributes
on page 350. Unlike its internal scripts, Adaptive CLI does not automatically create attributes. You
must also manually configure created attributes to be Mandatory, or Optional in that screen.
A few things to remember when using Perl:
The normal output of your Perl scripts (to stdout) are the commands sent to a device by this
application.
If your script produces an error message (to stderr), the job fails with that message and all
script outputs are ignored. You can validate a script before sending any command to the
device by using die(...) and warn(...) functions in Perl to produce error messages to stderr.
Such messages trigger the script's failure.
For such scripts to operate correctly, you must have Perl installed on the directory path for all
OpenManage Network Manager servers.
Perl does not come with OpenManage Network Manager and must be installed on the server
system independently for it to work with Adaptive CLI.
You can install your version of Perl and set the PATH environment variable accordingly so that
one can run perl -v from the command line (where the OpenManage Network Manager
server is to be started). Adaptive CLI invokes that same perl command.
If for some reason Adaptive CLI, fails to invoke the default perl command, it reads the
setting of activeconfig.perl.exe=... inside owareapps/activeconfig/lib/
ac.properties, and uses that alternative command.
Note that the default activeconfig.perl.prefix= setting in ac.properties is
prepended to every Perl script. It basically forces the script to use strict mode and
provides a convenient println method for the user. Knowledgeable Perl users can change
this default behavior setting but should be careful about it. Remember, best practice is to
override properties as described in Overriding Properties on page 23.
The standard output (using println) of the Adaptive CLI Perl script represents the
command set that is to be sent to the device. For convenience, a println subroutine is
embedded with the script.
368
Perl Scripts | Actions and Adaptive CLI

Advertisement

Table of Contents
loading

This manual is also suitable for:

Openmanage network manager 5.1

Table of Contents