Providing Method Options Or Attributes - Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Junos 10.3 Junos XML Management Protocol Guide
218
for the initial version of Junos OS Release 10.3). The files have names in the
10.3R1
format
package_methods.pl
The set of methods that correspond to operations on configuration objects is defined
in the
lib/JUNOS/Methods.pm
information about configuration operations, see "Changing Configuration Information"
on page 103 and "Summary of Junos XML Protocol Tag Elements" on page 149.
See the following sections for more information:
Providing Method Options or Attributes on page 218
Submitting a Request on page 220
Example: Getting an Inventory of Hardware Components on page 221
Example: Loading Configuration Statements on page 222

Providing Method Options or Attributes

Many Perl methods have one or more options or attributes. The following list describes
the notation used to define a method's options in the
lib/JUNOS/release/package_methods.pl
when invoking the method:
A method without options is defined as
get_system_uptime_information
## Method : <get-system-uptime-information>
## Returns: <system-uptime-information>
## Command: "show system uptime"
get_system_uptime_information => $NO_ARGS,
To invoke a method without options, follow the method name with an empty set of
parentheses as in the following example:
$jnx->get_system_uptime_information( );
A fixed-form option is defined as type
get_software_information
## Method : <get-software-information>
## Returns: <software-information>
## Command: "show version"
get_software_information =>
brief => $TOGGLE,
detail => $TOGGLE,
},
To include a fixed-form option when invoking a method, set it to the value
in the following example:
$jnx->get_software_information(brief => 1);
An option with a variable value is defined as type
the
get_cos_drop_profile_information
## Method : <get-cos-drop-profile-information>
## Returns: <cos-drop-profile-information>
## Command: "show class-of-service drop-profile"
, where
is a software package.
package
file in the Junos XML protocol Perl distribution. For more
lib/JUNOS/Methods.pm
files, and the notation that an application uses
, as in the following entry for the
$NO_ARGS
method:
. In the following example, the
$TOGGLE
method takes two fixed-form options,
$STRING
method takes the
and
and
brief
detail
1
(one) as
. In the following example,
profile_name
argument:
Copyright © 2010, Juniper Networks, Inc.
:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents