Python Scripting Configuration
Python Scripts Management and Execution
© Copyright Lenovo 2017
Python Scripting allows the user to create his own running programs on the
switch. These scripts allow the switch to perform the following:
monitoring tasks
automatically provision itself
automatically upgrade switch firmware/generate configuration files
Note: Python Scripting is not available in stacking.
The following sections describe the Python Scripting configuration options.
"Python Scripts Management and Execution" on page 679
"Scheduler Jobs Management" on page 681
"Running Job Monitor" on page 684
The user can perform various script management actions: edit or delete a script,
display script content.
In addition, the switch administrator may access Python shell and directly run a
script.
The following table describes the Python Scripts Management and Execution
commands.
Table 384.
Python Scripts Management and Execution Commands
Command Syntax and Usage
copy script tftp [address <IPv4 address>] [filename
<script filename>] [dataport|mgtport]
Creates a copy of the script on a TFTP server.
Command mode: Privileged EXEC
copy scriptlog tftp [address <IPv4 address>] [filename
<script log filename>] [dataport|mgtport]
Creates a copy of the script‐log on a TFTP server.
Command mode: Privileged EXEC
copy tftp script [address <IPv4 address>] [filename
<script filename>] [dataport|mgtport]
Copies a script from a TFTP server.
Command mode: Privileged EXEC
edit script <script filename>
Creates or modifies a script via VI text editor.
Command mode: All
Chapter 4: Configuration Commands
679