This document provides an overview of Junos PyEZ and links to related topics. There is also content available in the documentation in GitHub here.
Junos PyEZ is a Python "micro-framework" to remotely manage or automate Junos OS devices. The user is NOT required to be a software programmer, have sophisticated knowledge of Junos OS, or have a complex understanding of the Junos OS XML API.
This library was built for two types of users:
This means that non-programmers, for example, the Network Engineer, can use the native Python shell on their management server (laptop, tablet, phone, and so on) as their point-of-control for remotely managing Junos OS devices. The Python shell is an interactive environment that provides the necessary means to perform common automation tasks, such as conditional testing, for-loops, macros, and templates. These building blocks are similar enough to other "shell" environments, like Bash, to enable the non-programmer to use the Python shell as a power tool, instead of a programming language. From the Python shell, a user can manage Junos OS devices using native hash tables, arrays, and so on, instead of using device-specific Junos OS XML or resorting to "screen scraping" the actual Junos OS CLI.
There is a growing interest and need to automate the network infrastructure into larger IT systems. To do so, traditional software programmers, DevOps, hackers, and so on, need an abstraction library of code to further those activities. Junos PyEZ is designed for extensibility so that the programmer can quickly and easily add new widgets to the library in support of their specific project requirements. There is no need to "wait on the vendor" to provide new functionality. Junos PyEZ is not specifically tied to any version of Junos OS or any Junos OS product family.
Junos PyEZ is designed to provide the same capabilities as a user would have on the Junos OS CLI, but in an environment built for automation tasks. These capabilities include, but are not limited to:
The following illustrates the usage architecture of Junos PyEZ. This micro framework is built on top of the community provided ncclient library. The ncclient library provides the basic protocol transport for NETCONF-managed devices. Junos PyEZ enables both types of users--non-programmers and programmers--to easily interact and manage a network of JunosOS devices.