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

    Related Documentation

     

    request system yang add

    Syntax

    request system yang add package package-name <proxy-xml> module [modules] <action-script [scripts]><translation-script  [scripts]><deviation-module [modules]>

    Release Information

    Command introduced in Junos OS Release 16.1 on MX Series and T Series routers.

    Command introduced in Junos OS Release 17.1 on EX Series and QFX Series switches and PTX Series routers.

    Command introduced in Junos OS Release 17.3 on SRX345, SRX1500, SRX4100, SRX4200, SRX5400, SRX5600, and SRX5800 devices and vSRX instances.

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

    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.

    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-nameUser-defined identifier that represents the collection of YANG modules and scripts.
    proxy-xml module [modules]List of paths for one or more new 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.
    translation-script [scripts]List of paths for one or more translation scripts to add to the device as part of the package.

    Required Privilege Level

    maintenance

     

    Related Documentation

     

    Sample Output

    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>
    

    Modified: 2017-08-06