Automation frameworks
Getting started
Brief comparison of automation frameworks - https://forums.juniper.net/t5/Tech-Cafe-Ask-the-Author/SaltStack-Napalm/m-p/296413#M35
Automating your network operations blog: basic challenge, data model, model-driven automation
Many links on "Awesome Network Automation" - https://github.com/networktocode/awesome-network-automation
Ansible
Automation engine written in Python. Acquired by RedHat
Links: home, docs, networking, network modules, shared Ansible roles on Ansible Galaxy, napalm-ansible, network platforms tested by RedHat
AWX "provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX".
How to automate your network with Ansible and NAPALM: part 1, part 2, part 3, part 4
Community: network working group
Running Ansible programmatically:
- As a Python subprocess: generic example, relevant Python 3 docs
- Python API: Ansible, Ansible 2
Major changes: networking in 2.4; 2.5, porting guide, new connection plugin;
Also: command module deep dive
Pulumi
Infrastructure-as-a-Code SDK for Go, Python, TypeScript, etc. For multi-cloud and Kubernetes automation.
Terraform
Infrastructure-as-a-Code tool mainly used from CLI. For multi-cloud automation.
Links: home, Terragrunt (Terraform wrapper)
GitHub: Google Cloud Modules, SDK
Saltstack
Automation framework written in Python
Links: home, docs; walkthrough, network automation at scale book; napalm-salt; proxy modules.
Networking help/advice: https://networktocode.herokuapp.com/, rooms: #saltstack #napalm
Salt in general irc: #salt on freenode; Google groups: salt-users
Tutorials: NetOps with SaltStack and PyNSO
Nornir
Automation framework from developers of key network automation libraries. "Intended to be used directly from Python".
Vendor-neutral tools and libraries
NAPALM
About: 'NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) is a Python library that implements a set of functions to interact with different router vendor devices using a unified API'. Also works with YANG, " provides mechanisms to transform native data/config into YANG and vice versa".
Integrated with natively with SaltStack and Ansible via module
NetBox
About: "Web application designed to help manage and document computer networks. Initially conceived by the network engineering team at DigitalOcean."
Capirca
About: "Development and manipulation of network access control lists (ACLs) for various platforms". Originally developed by Google.
Links: GitHub, wiki, pypi, syntax highlighting for Capirca filetypes in Atom
Netmiko
About: 'An open-source Python library that simplifies SSH management to network devices. The library is based on the Paramiko SSH library'
TextFSM
About: "Allow programmatic access to information returned from the command line interface (CLI) of networking devices". Originally developed by Google.
Links: GitHub, NTC-Templates ("set of multi-vendor templates"; "these templates take the raw string input from the CLI and return structured text in the form of a Python dictionary".), index
FBNet Command Runner
About: Facebook's tool to run commands on many network devices from many vendors in parallel
GitHub - FCR
Related blog post
More libraries
ncclient - "Python library for NETCONF clients"
jxmlease - "A Python module for converting XML to intelligent Python data structures, and converting Python data structures to XML"
pexpect - "Pexpect allows your script to spawn a child application and control it as if a human were typing commands. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc."
pyang - "An extensible YANG validator and converter in python"
reclass - "Allow a system administrator to maintain an inventory of nodes to be managed, completely separately from the configuration of the automation tool. Usually, the external node classifier completely replaces the tool-specific inventory (such as site.pp for Puppet, ext_pillar/master_tops for Salt, or /etc/ansible/hosts). Links: docs, github
Python XML (advised by pynet.twb-tech.com):
- Libraries
- Docs
Vendor-specific tools and libraries
Juniper
GitHub: Juniper, JNPRAutomate, automation examples, PyEZ, py-junos-netconify; Google groups: PyEZ; OpenClos
Cisco
GitHub, pyIOSXR, CiscoConfParse, nxapi-learning-labs, XR Ansible, NX-OS Ansible, Tail-f ConfD, Open NX-OS, NetOps with SaltStack and PyNSO, PyNSO, pipeline; NetConf examples;
Cisco on GitHub with different programming languages: Python, Golang
Itential - a product used on top of NSO for some use cases - https://www.itential.com/
Arista
Nokia (Alcatel-Lucent)
Hewlett-Packard Enterprise
GitHub (generic non-networking), HP Networking, scripts