Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Disable and Enable YANG Translation Scripts on Devices Running Junos OS

You can load standard (IETF, OpenConfig) or custom YANG data models on devices running Junos OS to add data models that are not natively supported by Junos OS but can be supported by translation. When you extend the configuration hierarchy with nonnative data models, you must also supply one or more translation scripts. Tranlation scripts perform two main functions:

  • Map the custom configuration syntax defined by the YANG data model to the corresponding Junos OS syntax

  • Add the translated data to the checkout configuration as a transient change during the commit operation

When you add translation scripts to the device with a new or existing YANG package, they are enabled by default. You can disable the translation scripts in a YANG package at any time without removing the package and associated files from the device, which can be useful for troubleshooting translation issues. After you disable translation for a package and commit the configuration, the configuration data associated with the YANG data models in that package can be present in the active configuration, but the configuration has no impact on the functioning of the device.

When translation is disabled, you can still configure and commit the statements and hierarchies in the data models added by that package. However, the device does not commit the corresponding Junos OS configuration statements as transient changes during the commit operation for any statements in the data models added by that package, even for those statements that were committed prior to disabling translation.

To disable translation scripts for a given YANG package that is installed on a device running Junos OS:

  1. Issue the request system yang disable command, and specify the package identifier.
  2. Verify that the status of the translation scripts in the package is disabled.
Note:

When you disable translation for a package, the device retains any transient configuration changes that were committed prior to disabling translation until the next commit operation.

Note:

In configuration mode, you can issue the show | display translation-scripts translated-config command to verify which configured statements from nonnative YANG data models will be translated and committed during a commit operation. The command output does not include (and the device does not commit) the corresponding Junos OS configuration for those data models for which translation has been disabled.

To enable translation scripts for a given YANG package that is installed on a device running Junos OS:

  1. Issue the request system yang enable command, and provide the package identifier.

  2. Verify that the status of the translation scripts in the package is enabled.