request system yang add
Command introduced in Junos OS Release 16.1R1 on MX Series and T Series routers.
Command introduced in Junos OS Release 17.1R1 on EX Series and QFX Series switches and PTX Series routers.
Command introduced in Junos OS Release 17.3R1 on SRX345, SRX1500, SRX4100, SRX4200, SRX5400, SRX5600, and SRX5800 devices and vSRX instances.
proxy-xml option introduced in Junos OS Release 17.3R1 on MX Series and PTX Series routers.
Command introduced in Junos OS Release 18.1R1 on ACX Series routers.
snmp option introduced in Junos OS Release 18.3R1.
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.
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/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
Starting in Junos OS Release 18.3R1, Junos OS does not support adding, deleting, or updating YANG packages in configuration mode with the run command.
Devices that use the ephemeral configuration database will delete all ephemeral configuration data in the process of rebuilding the schema.
Required Privilege Level
request system yang add
user@host> request system yang add package p1 module [yang/if.yang yang/if-aggregate.yang yang/if-show.yang] deviation-module yang/deviation/if-devs.yang translation-script translation/if.slax action-script action/if-show.py
YANG modules validation : START YANG modules validation : SUCCESS Scripts syntax validation : START script check succeeds Scripts syntax validation : SUCCESS Scripts syntax validation : START Scripts syntax validation : SUCCESS TLV generation: START TLV generation: SUCCESS Building schema and reloading /config/juniper.conf.gz ... Activating /config/juniper.conf.gz ... mgd: commit complete Restarting mgd ... WARNING: cli has been replaced by an updated version: CLI release 16.1R1 built by builder on 2016–03–30 13:46:11 UTC Restart cli using the new version ? [yes,no] (yes) yes Restarting cli ... user@host>