Guide That Contains This Content
[+] Expand All
[-] Collapse All

Juniper Extension Toolkit Overview

Juniper Extension Toolkit (JET), an evolution of the Junos SDK, provides a modern, programmatic interface for developers of third-party applications. It focuses on providing a standards-based interface to the Juniper Networks Junos operating system (Junos OS) for management and control plane functionality.

Starting in Junos OS Release 16.2R1, JET no longer supports the Apache Thrift software framework for remote procedure calls (RPCs). The gRPC framework replaces the functionality previously supplied by Thrift. For more information, see JET Interaction with Junos OS

JET supports the following:

  • Multiple languages for applications that run off-box
  • Python for applications that run on a device running Junos OS
  • Applications written in C to run on devices that do not use the JET APIs
  • An event notification method that enables the applications to respond to selected system events

See the following sections for more developer overview information. For information on configuring JET applications to run on a device running Junos OS, see the Administration Guide for Juniper Extension Toolkit Applications.

JET Interaction with Junos OS

JET uses gRPC, a remote procedure call (RPC) framework, for cross-language services (see http://www.grpc.io/) as a mechanism to enable request-response service. gRPC provides an interface definition language (IDL) that enables you to define APIs. These IDL files (with .proto as the file extension) are compiled using the protoc compiler to generate source code to be used for the server and client applications. The gRPC server is part of the JET service process (jsd), which runs on Junos OS.

For event notification, JET uses the Message Queue Telemetry Transport (MQTT) protocol (see http://mqtt.org/). Event notification is implemented through the mosquitto notification broker (see http://mosquitto.org/).

Figure 1 illustrates the request-response and notification services.

Figure 1: JET Request-Response and Notification Services

JET Request-Response
and Notification Services

JET Application Development

JET includes a virtual machine (VM) package as a vagrant file that includes its own Eclipse integrated development environment (IDE), plug-ins, and other tools and libraries.

This developer guide covers a few JET application development scenarios using the supplied packages; however, JET APIs function within any framework (for example, Twisted). You can use any programming framework that you prefer to develop applications. You can use any IDE (such as PyCharm IDE or Eclipse) while developing against the Python library JET supplies, or you can use your preferred editor. You can use a text editor (such as vi) to directly write a Python file.

This guide covers the following JET application development scenarios:

  • Application development workflow using the JET VM and the IDE
  • Application development workflow using the JET VM with manual workflow
  • Application development workflow using the interface definition language (IDL) and the MQTT library

JET Application Deployment

The following deployments for Python applications on Junos OS are supported:

  • Regular Junos OS (veriexec-enabled Junos OS) with the python configuration enabled at the [edit system scripts language] hierarchy level. In this scenario, the system will not perform veriexec checks for a Python application as long as the application is located under the /var/db/scripts/jet directory and configured at the [edit system extensions] hierarchy level. In this scenario, an unsigned package for a Python-only application (a Python script with no dependencies on unsigned shared libraries) will work. Any application in a signed package will also work.
  • Regular Junos OS (veriexec-enabled Junos OS) with the python configuration disabled at the [edit system scripts language] hierarchy level. In this environment, only those Python scripts that are part of a signed package can be executed. Therefore, only a signed package will work for this scenario.

Note: Junos OS supports using symbolic links for files in the /var/db/scripts/jet directory, but the device will only execute the script at the target location if it is signed.

Junos OS Automation Tools

JET is one of the Junos OS automation tools. Other automation tools for Junos OS include the following:

  • Junos PyEZ — A microframework for Python that enables you to remotely manage and automate devices running Junos OS.
  • Automation scripts (see the Automation Scripting Feature Guide).
    • Commit scripts—Manage the configuration process.
    • Operational scripts—Perform operational tasks and network troubleshooting.
    • Event scripts and event policy—Instruct the operating system to perform actions in response to system events.
    • SNMP scripts—Support custom MIBs until they are implemented in Junos OS.

JET Developer Tasks

This guide describes the developer tasks necessary to produce third-party applications. See Table 1 for a list of the JET developer tasks and where to find details about them in this guide.

Release History Table

Release
Description
Starting in Junos OS Release 16.2R1, JET no longer supports the Apache Thrift software framework for remote procedure calls (RPCs). The gRPC framework replaces the functionality previously supplied by Thrift. For more information, see JET Interaction with Junos OS

Modified: 2016-11-17