Importing Junos Scripts

This section describes how you can import Junos OS-based scripts such as commit scripts, op scripts, and event scripts into the Junos Scope CVS repository from the local file system.

To import a Junos script into the Junos Scope CVS repository, follow these steps:

  1. In the Junos Scope main window, click Configuration > Repository > Scripts. The Scripts dialog box appears.
    Image s001521.gif

     All Junos OS-based scripts saved in the Junos Scope CVS repository are listed in the Scripts dialog box alphabetically by name. The dialog box displays the script filename, type, and the actions you can perform on scripts.

  2. Click Import. The Import dialog box appears.
    Image s001520.gif
  3. Browse to the location on your local machine where you have stored the Junos script to be imported.
  4. Enter the MD5 checksum value in the MD5 Checksum For Verification (Optional) field. The checksum can be obtained from when you download the script. This checksum value is compared with the checksum stored in Junos Scope to verify that the downloaded script is intact. This field is optional.
  5. Select the script type from the Script Type drop-down list box.

    There are three script types:

    • Commit—A commit script enforces custom configuration rules. Each time a new candidate configuration is committed, the script inspects the configuration. If a configuration violates your custom rules, the script corrects the problem.
    • Op—An op script automates network troubleshooting and network management. It can perform any function available through the remote procedure calls (RPCs) supported by two APIs: the Junos extensible markup language (XML) API and the Junos XML management protocol.
    • Event—Event scripts are op scripts invoked in response to event notifications such as system log messages and SNMP traps received by the event process.
  6. In the Comment text box, type an optional comment for the script.
  7. Click Import. The Import Result dialog box appears.
    Image import_result.gif
  8. Click OK. The new Junos script appears in the Scripts dialog box.