Identify the concepts, general features of Junos support for YANG models
While NETCONF provides a standardised way to connect to network devices, YANG provides the means to define the content carried through NETCONF, both data and operations.
YANG is a standards based, extensible modeling language that is used to model the configuration and operational state data, RPCs and server event notifications of network devices.
It can be used to model any activity or function that can be performed over a NETCONF session with a Juniper device.
YANG is used to model Configuration, State data, RPCs and Notifications.
YANG models are more readable than their XML counterparts.
JunOS supports three types of YANG models, custom YANG modules, Native Junos OS YANG Modules amd OpenConfig Modules.
Yang models are used in two main ways:
-To Verify Configuration
-To Verify Interoperability
Creating YANG packages in Junos
1- Download the YANG modules and any necessary scripts to any directory on the device
2- For Python scripts enable the Python language and ensure proper file permissions
-Owned by root or SU
-Only file owner has write permissions, executer has read permissions
3- Validate the syntax of modules and scripts (optional)
request system yang validate module [modules] action-script [scripts] translation-script [scripts]
4- Create a YANG package with a unique identifier, and specify the file paths for the modules and scripts that are part of that package
request system yang add package package-name module [modules] deviation-module [modules] transation-script [scripts] action-script [scripts]