Juniper Networks TechWiki > Automation Scripting > Junos PyEZ

Junos PyEZ

Overview

This document provides an overview of Junos PyEZ and links to related topics. There is also content available in the documentation in GitHub here.

About

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:

Non-Programmers - Python as a Power Shell

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.

Programmers - Open and Extensible

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.

Features

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:

  • Provide "facts" about the device such as software version, serial number, and so on
  • Retrieve the "operational" or "run-state" information (think "show" commands) using Tables/Views
  • Retrieve the configuration using Tables/Views
  • Make unstructured configuration changes with "snippets" and "templates"
  • Make structured configuration changes with modeled abstractions
  • Provide common utilities for tasks such as secure copy of files and software updates

Architecture

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.

Junos PyEZ Architecture

You must to post a comment.
Last Modified
12:10, 14 Jul 2014

Page Rating

10 of 10 found this page helpful.

Tags

Glossary

 
Copyright© 1999-2014 Juniper Networks, Inc. All rights reserved.