This repository is a simple example of a couple Python scripts that can be used to retrieve and set configuration information from an IOS XE device. This code is provided to accompany a blog on the same topic.
You can execute these scripts yourself by reserving a DevNet Sandbox (completely free) and following these steps.
-
Clone the code and change to the clone directory.
git clone https://github.com/hpreston/netconf_yang_blog cd netconf_yang_blog
-
Connect to the sandbox VPN using the credentials sent to you through email.
-
(recommended) Create and activate a Python virtual environment.
-
Install the Python requirements.
pip install -r requirements.txt
-
Get the configuration.
python get_full_config.py
-
Send the configuration.
python push_standard_config.py