Version 1.1 of YANG language is out

A complete specification of the new 1.1 version of the YANG data modelling language was published as RFC 7950 on the last day of August. After a relatively slow start, in the last two years the use of YANG has been steadily increasing not only in the IETF but also in other standard development organisations such as IEEE or BBF, and also in the industry. Nowadays, YANG is regarded as a fundamental tool for secure remote administration of network devices and services. It becomes clear that standard and machine-readable data models of configuration and state data – that is, definition of their structure, data types and semantic rules – are ultimately more important than the concrete management protocol that is used for transmitting and editing the data. Despite some reluctance on the side of equipment vendors who love their proprietary CLIs, especially operators of large and heterogeneous networks have been pressing hard to make the management data as standard and cross-platform as possible.

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 actionsRPC 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!

Author:

Leave a comment