368
Perl Scripts | Actions and Adaptive CLI
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.
Summary of Contents for OpenManage Network Manager
Page 1: ...Dell OpenManage Network Manager version 5 1 Web Client Guide ...
Page 14: ...14 A Note About Performance Preface ...
Page 98: ...98 Schedules Portal Conventions ...
Page 142: ...142 Vendors Key Portlets ...
Page 232: ...232 File Management File Servers ...
Page 242: ...242 Deploy Configuration ...
Page 290: ...290 Key Metric Editor Monitoring Metrics This panel s display depends on the selected device ...
Page 340: ...340 ...
Page 374: ...374 Adaptive CLI Records Archiving Policy Actions and Adaptive CLI ...
Page 380: ...380 Glossary ...
Page 388: ...388 388 Index ...