Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

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

    Using the JET IDE to Create an Application

    This tutorial leads you through building a Juniper Extension Toolkit (JET) application that has no dependency on C or C++ modules. Its purpose is to familiarize you with the virtual machine (VM) and integrated development environment (IDE). This example walks you through where to put your files in the directory structure and how to configure the application on the router.

    Before you start writing code, you need to download the JET VM. For detailed procedures, see Downloading the Packages You Need.

    Normally, you need to install your certificate files before you develop applications. Since this example covers building an unsigned application, it skips the installation of the certificate files.

    To create a simple Python application:

    1. Start the JET VM by using the vagrant up command.
    2. In the VM, double-click the eclipse icon to open the JET IDE.
    3. Select Juniper Extension Toolkit > Jet Project from the menu bar.
    4. Name the project, select None from the Applications List, and click Finish.

      You will be able to see the sandbox directory in the left pane.

    5. Create your Python application file.

      1. Select the python directory in the left pane, right-click to create new folder, and give this folder the name of your project.
      2. Select the new folder, right-click to create a new file, and name the file, for example,
    6. Select to accept the default preferences for PyDev.
    7. Type a simple Python program such as the following and save:
      print “hello world”

      You can save in one of the following ways: select File > Save, press Ctrl+s, or click the diskette icon.

    8. Create the JSON file.

      The JSON file is created in a directory relative to the sandbox’s src directory.

      1. Select the src directory in the left pane, right-click to create a file, and name it, for example, hello.json.

        If you do not see the JSON form, select the new .json file in the left pane and right-click to select Open with JSON Editor.

      2. Fill in the JSON form and do one of the following to save: select File > Save, press Ctrl+s, or click the diskette icon.
    9. Select the project name in the left pane, and select Juniper Extension Toolkit > Run JET Configuration from the menu bar.
    10. Deploy the application on a Junos OS device.

    Modified: 2016-06-28