Even though it was declared as a maintenance revision, YANG 1.1 introduces a few remarkable new features:
- It is possible to define so-called actions – RPC operations tied with a particular node in the data schema. The difference between actions and “plain” RPC operations that were available already in YANG 1.0 is similar to how methods differ from functions in object-oriented programming.
- Likewise, it is possible to define asynchronous notifications tied to schema nodes.
- Several new XPath functions provide additional means for specifying semantic rules and restrictions.
- The description of a specific data model implementation. i.e. the set of YANG modules with their revisions, optional features and other details supported by the device, was changed from the ground up. The new format of this description, known as YANG Library, is described in RFC 7895.
Two further extensions of the YANG language, both with my authorship, were published together with YANG 1.1 spec as RFC 7951 and 7952.
The former defines JSON serialisation of data modelled with YANG. JSON thus becomes a standard alternative to XML that was originally the only serialisation format. Ten or more years ago, when YANG and related technologies were conceived, XML was an obvious choice, but these days JSON is a clear favourite as a notation for representing and transmitting structured data. Not only is it considerably more compact, but also much easier to work with in programming languages. A number of YANG-based tools and projects supported the JSON serialisation even before RFC 7951 was published, for example YumaPro and OpenDaylight.
A new binary serialisation format for YANG – CBOR – should also make it into an RFC before long. This way, YANG effectively becomes a serialisation-independent schema language for hierarchical data, which is IMHO quite interesting.
Finally, RFC 7952 extends YANG with the possibility to define annotations that may be attached to regular data and contain metadata or other information. A simple example is a boolean attribute that allows for deactivating a subtree in configuration without actually deleting the subtree from the configuration repository.
Good luck, YANG 1.1!