Using The Xml Api - HP 2000fc Cli Reference Manual

Modular smart array
Hide thumbs Also See for 2000fc:
Table of Contents

Advertisement

The example shows a Perl script for logging in.
script to log a user into the CLI. The script uses the command-line parameters
specified as the IP address, username, and password. Once the user has been logged
in, other commands can be sent to the CLI.
The command below provides better scripting support. The first argument sets the
output format to XML, which allows easier parsing. The second argument disables
the paging mode that pauses for each full screen of command output.
$telnet->cmd("set cli-parameters api pager disabled");
The following code segment shows how to get the entire configuration information
from the CLI and print the output. The output can easily be redirected to a file for
archiving.
@sV = $telnet->cmd("show configuration");
for ($i=0; $i<scalar(@sV); $i++)
{
}

Using the XML API

You can set the CLI output to either
parameters
use an XML parser such
store this information as objects.
An updated Document Type Definition (DTD) is available with each update of the
firmware.
The XML parser should use the DTD version that corresponds to the firmware level
to ensure that the DTD is validated. By obtaining the latest DTD for validation, the
parser will be forward compatible.
print ("@sV[ $i ]");
command. When set to
XML::Parser
is called at the start of the
cLogin
or
using the
console
api
, the output is returned in XML. You can
api
in Perl to process the XML output and
Chapter 1 Using the CLI
set cli-
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Storageworks 2000 series

Table of Contents