Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

request system yang add

Syntax

Description

Define a new YANG package with the modules, deviation modules, and scripts that are added to the device as part of the package, and merge the data models defined in the modules with the Junos OS schema. When you add a custom YANG data model to the device, you must also add at least one translation script or one action script, which provides the mapping between the new data model and Junos OS. To add multiple modules or scripts, include a space-delimited list of absolute or relative file paths enclosed in brackets.

Note:

To install OpenConfig modules that are packaged as a compressed tar file, use the request system software add command. OpenConfig modules and scripts that are installed using the request system software add command are always associated with the package identifier openconfig.

When you create a new package, the device stores copies of the module and script files in a new location. The device also stores copies of the action script and translation script files under the /var/db/scripts/action and /var/db/scripts/translation directories, respectively. Junos OS validates the syntax of the modules and scripts, rebuilds its schema to include the new data models, and then validates the active configuration against this schema. Newly added RPCs and configuration hierarchies are immediately available for use.

Note:

Devices that use the ephemeral configuration database will delete all ephemeral configuration data in the process of rebuilding the schema.

Note:

To prevent CLI-related or configuration database errors, we recommend that you do not perform any CLI operations, change the configuration, or terminate the operation while a device is in the process of adding, updating, or deleting a YANG package and modifying the schema.

Note:

Starting in Junos OS Release 18.3R1, adding, deleting, or updating YANG packages in configuration mode with the run command is not supported.

Options

action-script [scripts]

List of paths for one or more action scripts to add to the device as part of the package.

module [modules]

List of paths for one or more YANG modules to add to the device as part of the package. The device merges the data models defined in the modules with the Junos OS schema.

deviation-module [modules]

(Optional) List of paths for one or more modules that define deviation statements that should be applied to modules in the package.

package package-name

User-defined identifier that represents the collection of YANG modules and scripts.

proxy-xml

(Optional) Specify that module is a list of paths for one or more modules that provide user-defined OpenConfig mappings for the XML Proxy process to translate Junos Telemetry Interface statistics exported through gRPC into key-value pairs.

snmp

(Optional) Specify that module is a list of paths for one or more YANG modules that define custom MIBs. The system converts the modules to JSON format, and the snmpd process parses the JSON data and builds its internal database.

translation-script [scripts]

List of paths for one or more translation scripts to add to the device as part of a package. YANG modules that define configuration data models require one or more translation scripts to map the nonnative configuration syntax to the corresponding Junos OS syntax.

Required Privilege Level

maintenance

Sample Output

request system yang add

Release Information

Command introduced in Junos OS Release 16.1R1.

proxy-xml option introduced in Junos OS Release 17.3R1 on MX Series and PTX Series routers.

snmp option introduced in Junos OS Release 18.3R1.