Administrator Guide

8 Python Scripting for Dell Networking N-Series | Version 1.0.1
The list below includes the techniques represented in the flow chart along with a few others. The commands
mentioned are covered in detail in this guide.
Starting and Stopping a Python script
Methods of starting Python scripts include the following:
Using the application start command
Using the start-on-boot parameter and reloading the switch
Using the auto-restart parameter (restarts/loops the script)
Call the script from another script (Python or other)
Methods of stopping Python scripts include the following:
Script completes (not in a loop)
Using the application stop command
Using the no application install command
Using the erase application command
A switch reload (and script is not set to start-on-boot)
Script is halted by another script using an above command
1.5 Tarball (.tgz and tar.gz)
Before copying a Python script to a switch (as shown at the top of Figure 2), the administrator must set the
appropriate permissions, then compress the file into a tarball:
1. Set the execute permission on the script file.
2. Compress the script into a zipped tar archive file (tarball), with either a .tgz or .tar.gz extension.
The second step is generally accomplished from a Linux command line using the command:
tar cfz <script filename>.tgz <script filename.py>
Other methods may also be used, such as right-clicking the file from the GUI desktop and selecting
Compress…. The N-Series switch will automatically decompress the file after copying, placing the
executable script file into the user-apps directory.