I\'ve read https://en.wikipedia.org/wiki/YANG but still having problems to understand the practical use of YANG
, and the benefits it provides. As I understand,
YANG is a specialized schema language, akin to XSD Schema or RelaxNG but (was) specific to NETCONF. Its goal is to model all content that is exchanged during protocol sessions between peers, as described in RFC6020:
YANG is a language used to model data for the NETCONF protocol. A YANG module defines a hierarchy of data that can be used for NETCONF- based operations, including configuration, state data, Remote Procedure Calls (RPCs), and notifications. This allows a complete description of all data sent between a NETCONF client and server.
The model defined by YANG may be consumed in the usual way - code generation for example, like what JAXB does for XSD Schema and Java. There are tools and server implementations out there that simply consume the YANG module set (a YANG model) and are ready to be used as dummy implementations. There are also tools that use the model to enable users to query a device, without actually implementing anything specific about the device. You could say that a set of YANG modules exposes the interface provided by a device. What you do with this interface is entirely up to you.
I suggest reading the high level overview provided in the specification:
Also check the wiki page of the ietf-netmod-yang tag.
Edit: You may also benefit from reading the An Architecture for Network Management Using NETCONF and YANG document. It further explains the architecture which YANG a is part of, including how different roles such as application developers should approach it (in the context of network management).