Using The Perl Api; Creating A Perl Api Script - Dell FORCE10 Open Automation Configuration

Open automation guide
Table of Contents

Advertisement

Figure 3-2. Execution of a PERL, Python, and Shell Script from a UNIX Shell: Example
<---------------------------------- Log on to a UNIX shell
FTOS# start shell
4.4 BSD UNIX () (ttyp0)
login: admin
Password:
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
The NetBSD Foundation, Inc.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California.
$ cd /f10/flash/scripts
<------------------------------------------------- List the existing scripts
$ ls
createVlans.pl
createVlans.py
$ ./createVlans.pl 12 14
$ perl createVlans.pl 12 14
$ ./createVlans.py 12 14
$ python createVlans.py 12 14
$ ./createVlans.sh 12 14

Using the PERL API

All rights reserved.
createVlans.sh
<-------------------------- Execute the PERL script using either command
<-------------------------- Execute the Python script using either command
<-------------------------- Execute the UNIX shell script
Use the information in this section to create a PERL script using the PERL API and
run the script on a Dell Force10 switch. For information on how to create and run a
Python script using the Python API, see

Creating a PERL API Script

The Programmatic Management package provides a PERL API library containing the
supported functions (described in
invoke FTOS operations on a switch. The PERL API library is stored in the
F10SmartUtils.pl file at /usr/pkg/scripts/smartutils.
You code FTOS API functions in a PERL script as shown in the following example:
All rights reserved.
Using the Python
Table
3-2), which can be used in a PERL script to
API.
Smart Scripting | 23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Force10

Table of Contents