Outlines how to configure external scripts to automate network model operations using the OPM and Design RPC Python libraries. This enables you to run customized scripts and CLI tools efficiently in your environment.
In Cisco Crosswork Planning, OPM Python library (previously known as OPM API) and Design RPC Python libraries (previously known as Design RPC APIs) are supported via scripts. You can upload customized scripts that are created using these APIs. You can also use the scripts to run the CLI tools.
OPM Python libraries provide a powerful Python API to manipulate network models. It lets you operate on the network without having to worry about device-specific properties. Even if the underlying routers are replaced by routers from a different vendor, the API calls remain exactly the same.
For a sample Python script, refer to Example: Run external scripts.
Complete these steps to run the external scripts.
Procedure
| 1. | From the main menu, choose Job Manager. The Job Manager page opens, displaying the list of all jobs submitted as background jobs. |
|
| 2. | Click A list of scripts available in the user space appears. |
|
| 3. | Select the required script and click Next to continue. If the required script is not available in the list, use the Upload script option to upload the script. The script name appears under Available Scripts. You can also find the script file under the Network Models > My user space > All files section. |
|
| 4. | Select the network models on which you want to run the script, and click Next. |
|
| 5. | Enter the input configuration options in the text field using this format and click Next.
Use the Edit button to change the script file, if required. |
|
| 6. | On the Run Settings page, choose whether to execute the task immediately or schedule it for a later time. You can also set priority for the jobs. Choose from these Execute options:
|
|
| 7. | Track the status of the job on the Job Manager page. The Job column displays "User-Script" for the script jobs. Once the job completes, import the output plan file into user space to visualize it. For more information, refer to Access output plan files from job manager. |