Paul Krill
Editor at Large

Nornir offers Python-based network-management automation

news
Apr 26, 20192 mins

The alternative to Ansible promises less work for automation developers

sdn software defined network architecture
Credit: monsitj / Getty Images

Nornir, an automation framework that uses Python directly, provides an alternative to other automation frameworks that use their own domain-specific language (DSL).

The framework can dispatch tasks to devices and nodes, deal with inventory when the user has host information, and support the writing of plugins. For troubleshooting, users can use existing debug tools directly from Python.

Cisco systems engineer Dmitry Figol, a Nornir contributor, says Nornir is more flexible than Red Hat’s Ansible, an IT automation language that uses YAML running on top of Python. Figol claims these benefits for Nornir:

  • It provides an abstraction for inventory, including hosts and groups, and concurrent task execution. Developers do not have to write their own threading.
  • Nornir is just another Python library that can be imported.
  • It is flexibile and extensibie.
  • Any troubleshooting, debugging, or testing tool can be used from the Python ecosystem.
  • Existing libraries, including netmiko and napalm, are used for connections.
  • Opened connections are automatically closed.
  • Nornir can be integrated with Python frameworks such as Flask or Django. For networking testing, it can integrate with the Pytest framework.

Nornir can run as a standalone script and print results to the console. It also can integrate with a web framework. It does require knowledge of Python, Figol said.

Where to download Nornir

Nornir requires Python 3.6 or higher. You can install Nornir with pip, the Python package installer: pip install nornir.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author