Running A Python Api Script - Dell FORCE10 Open Automation Configuration

Open automation guide
Table of Contents

Advertisement

Table 3-4. Supported FTOS API Functions in Python Scripts (continued)
F10ShowVlanIntStatus
F10ShowVrrp
F10ShowVrrpBrief
F10Traceroute
F10WriteMem
30
|
Smart Scripting
(vlanId)
None
None
(ipAddress, timeout)
None

Running a Python API Script

When you run a Python script that invokes the API functions in
credentials are read from the smartutils.cfg file, and a telnet session is opened on the
switch in which function calls are executed in the FTOS CLI. The script closes the
telnet session after running all the CLI commands.
The smartutils.cfg file is the configuration file used by the Programmatic
Management package. It contains the user name and passwords required to log on to
a switch via telnet and access the CLI to execute the function calls in a Python API
script. The smartutils.cfg file is downloaded with the Programmatic Management
package and is stored at /usr/pkg/scripts/smartutils.
Note: The user name and passwords contained in the smartutils.cfg file are used to
log in and run only the scripts created using the PERL, Python, and UNIX APIs
described in this chapter
characters.
To configure the username and passwords in the smartutils.cfg file that are used to
run Python API scripts, do one of the following:
From the Web user interface, select
Options).
From a UNIX shell, use the UNIX text editor to open the smartutils.cfg file, enter
a user name and password, and save the file.
To run a Python API script:
From the FTOS CLI, use the
from the FTOS
CLI.
From a UNIX shell, follow the procedure described in
UNIX
Shell.
Returns the detailed status of a specified VLAN interface.
Returns the full VRRP status output.
Returns a brief VRRP session summary.
Performs a traceroute operation to an IP address from the switch.
Write the running configuration to the startup configuration file.
.
A username used to run scripts cannot contain special
Settings > SmartUtils Credentials
command as described in
script
Table
3-4, logon
(see
Menu
Running a Script
Running a Script from the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FORCE10 Open Automation and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Force10

Table of Contents