Step 3. Understanding how to leverage YANG data models

There are multiple ways for network engineers or developers to leverage YANG data models. This is important to understand, so engineers understand how they are interfacing with YANG.

Some orchestrators such as Cisco's Network Services Orchestrator (NSO) allows users to model network services in the YANG data modeling language. For example, engineers could model a VPN service in YANG and compile the data models on the NSO platform. After creating some custom code, NSO can then orchestrate the new service across multiple network elements when a user provisions a new customer. The figure below illustrates this concept.

Similarly, OpenDayLight which is the basis of Cisco's OSC platform allows engineers to model an application (or service) in the YANG data modeling language. Developers or engineers can model new control plane applications or their APIs in YANG and compile them on ODL. After creating some additional custom code, ODL can then act as the centralized control plane or management plane for the underlying network. The figure below illustrates this concept.

Lastly, individual network devices are exposing NETCONF and RESTCONF interfaces directly that are modeled using YANG. Through projects such as OpenConfig, engineers are modeling common configuration scenarios using the YANG data modeling language. When a device supports an OpenConfig YANG model, this ensures a consistent API across devices regardless of the network operating system or vendor. This allows network engineers and software engineers alike to write applications or scripts against a consistent API. Note that in the example shown below, the Orchestrator may be a product from a vendor, a simple Python script, or a complex, custom application. Also, other standard bodies and organizations such as the IETF using YANG to model common configuration scenarios, data, and services as well.

The examples in this learning lab consume a YANG data model supported by a network device as shown in the above diagram. In the next part of the exercise, we shall get some hands on exposure with YANG and see how it relates to NETCONF.