[Contents]
[Prev]
[Next]
[Index]
[Report an Error]
Obtaining
and Recording Parameters Required by the JUNOS::Device Object
The JUNOS::Device object takes the following
required parameters, specified as keys in a Perl hash:
- The access protocol to use when communicating with the
JUNOScript server (key name: access). For a list of the acceptable
values, see Supported Access Protocols. Before the application
runs, satisfy the protocol-specific prerequisites described in Prerequisites for Establishing a Connection.
- The name of the routing platform to which to connect (key
name: hostname). For best results, specify either a fully
qualified hostname or an IP address.
- The username under which to establish the connection to
the JUNOScript server and issue requests (key name: login). The username must already exist on the specified routing platform
and have the permission bits necessary for making the requests invoked
by the application.
- The password for the username (key name: password).
The sample scripts record the parameters in a Perl
hash called %deviceinfo, declared as follows:
my %deviceinfo = (
access => $access,
login => $login,
password => $password,
hostname => $hostname,
);
The sample scripts obtain the parameters from options
entered on the command line by a user. Your application can also obtain
values for the parameters from a file or database, or you can hardcode
one or more of the parameters into the application code if they are
constant.
[Contents]
[Prev]
[Next]
[Index]
[Report an Error]