Installing a Python Script
Context
Before running a Python script on a device to deploy the OPS function, upload the script to the device and install it.
Procedure
- Upload the Python script to the root directory of flash:
on the device.
For details about how to upload the script, see File Management in S9300, S9300E, and S9300X V200R012C00Configuration Guide - Basic Configuration.
- Run ops install file file-name [ destination directory ]
A Python script is installed.
If destination directory is not specified, the script is installed in the $_user directory.
If destination directory is specified, the script is installed in the $_user/directory directory.
If the directory name does not exist, a directory is created.
To modify a script that has been installed, run the ops uninstall file command to uninstall the script and the delete (user view) command to delete the script file. After modifying the script, upload and reinstalling the script file.