Administrator Guide

9 Python Scripting for Dell Networking N-Series | Version 1.0.1
2 Switch commands for utilizing Python scripts
This section covers all Dell N-Series commands for installing and managing Python scripts on an N-series
switch: copy, dir, application install, show application, application start, application stop and erase. The
commands are presented here in the order typically used. Descriptions, syntax and examples for each are
described in detail below.
2.1 copy
Use the copy command to copy Python scripts from the source to the switch. Scripts must first be
compressed into a .tgz or .tar.gz file as discussed on page 8. Using the application option, the compressed
files are automatically decompressed and placed into the user-apps directory.
Syntax:
copy source-url/filename application filename
Example: console#copy tftp ://172.100.1.50/hello.tar.gz application hello.tar.gz
.
.
.
Application download completed successfully.
If the script must automatically run after a switch reload, use the application install command (below) to
install a script. Then use the copy command again to save the running-configuration to the startup-
configuration. This is especially necessary for the start-on-boot parameter to succeed.
Note: There is a limit of 16 characters for script filenames, including the extension. This limitation also
applies to the compressed (.tgz or .tar.gz) file containing the script.
2.2 dir
Use the dir command to show all Python scripts that were copied to the user-apps directory on the switch.
Scripts in this directory can be installed as user applications. See the copy command for directions on how to
copy other scripts into this directory.
Syntax:
dir user-apps
Example: console#dir user-apps
Attr Size(bytes) Creation Time Name
drwx 1088
Dec 30 2015 13:54:31 .
drwx 2824
Dec 30 2015 10:25:35 ..
-rwx 50 Dec 29 2015 21:18:18 hello
.
.
.
Total Size: 215265280
Bytes Used: 778487
Bytes Free: 214486793
Note: The show application files command presents the same output without attributes and time stamp