Workflow to Run Config Scripts
Complete the following tasks to provision config scripts:
Enable the config scripts feature—Globally activate the config scripts feature on the router using configuration validation scripts command.
Download the script—Store the config script on an HTTP server or copy to the hard disk of the router. Add the config script from the HTTP server to the script management repository (harddisk:/mirror/script-mgmt) on the router using the
script add config
command.Validate the script—Check script integrity and authenticity using the
script config script.py checksum
command. A script cannot be used unless the checksum is configured. After the checksum is configured, the script is active.Note: A config script is invoked automatically when you validate or commit a configuration change to modify the candidate configuration.
Validate the configuration—Ensure that the configuration changes comply with the predefined conditions in the script and uncover potential errors using
validate config-scripts apply-policy-modifications
command.View the script execution details—Retrieve the operational data using the
show operational Config Global Validation Script Execution
command.
The following image shows a workflow diagram representing the steps involved in using a config script:
For more information about performing the workflow, managing Config scripts, and viewing examples, see the Automation Scripts chapter based on the platform:
- Programmability Configuration Guide for Cisco 8000 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco NCS 5000 Series Routers, IOS XR Release 7.3.x and later versions