Swiss Army Conf

I humbly present to you, my first submission to Cisco DevNet's Automation Exchange. Written in Python, this tool offers those monitoring a network device with 3 avenues for viewing device configuration: NETCONF, RESTCONF and SSH. The results are automatically logged in XML, JSON and text formats, respectively.

About the LAB to run the demo:

We will be interacting with an Always-On Sandbox instance of a Cisco Cloud Services Router - CSR1000v

Sandbox URL: https://devnetsandbox.cisco.com/RM/Diagram/Index/27d9747a-db48-4565-8d44-df318fce37ad?diagramType=Topology

CSR1000V Host: ios-xe-mgmt.cisco.com

SSH Port: 8181

NETCONF Port: 10000

RESTCONF Ports: 9443 (HTTPS)

Credentials of this public available Sandbox to specify when prompted for it:

Username: developer

Password: C1sco12345

Dependencies: See requirements.txt


Walk

  1. Create and activate a virtual environment to conduct this lab in
  2. Fork and clone the GitHub repository:
    git clone https://github.com/xanderstevenson/network-automation-demo.git
  3. Install required dependencies:
  • cd network-automation-demo
  • pip install -r requirements.txt
  1. Run the script
  • python main.py
  1. You will be prompted to enter the credentials (username & password listed above)
  2. Make a choice from the options in this menu:

For the main 5 choices, a copy of the relevant log will be automatically copied as backup to a text file in your local repo.

Related Sandbox:

IOS XE on CSR Recommended Code Always On Sandbox

README.md

https://github.com/xanderstevenson/swiss-army-conf/blob/main/README.md

Acknowledgements:

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.