YANG

YANG is a data modeling language used to model the operations and content layers of NETCONF, as well as configuration and status data manipulated by NETCONF, RPC, and NETCONF notifications.

YANG is proposed by the NETMOD working group and released in IETF RFC 6020. This language is a modular language between UML (advanced) and implementation, and is similar to the ASN.l language in that it describes any object in a tree. This is similar to the Management Information Base (MIB) of SNMP (MIB is described in ASN.l). Flowever, YANG is more flexible than SNMP (SNMP defines the entire tree hierarchy too rigidly, so its application scope is limited). YANG claims that it is compatible with SNMP. It defines the following four types of nodes to model configuration data and state: leaf nodes, leaf-list nodes, container nodes, and list nodes.

154 ■ Cloud Data Center Network Architectures and Technologies

Function Description

YANG is a language used to model data for the NETCONF protocol. A YANG model defines a data hierarchy that can be used for NETCONF- based operations, including configuration, state data, RPCs, and notifications. This allows a complete description of all data transmitted between the NETCONF client and server.

YANG models the hierarchical organization of data as a tree in which each node has a name, and either a value or a set of child nodes. YANG provides clear and concise descriptions of the nodes, as well as the interaction between those nodes.

YANG structures data models into modules and submodules. A module can import data from other external modules. The hierarchy can be augmented, allowing one module to add data nodes to the hierarchy defined in another module. This augmentation can be conditional, with new nodes appearing only if certain conditions are met.

YANG models can describe constraints to be enforced on data, restricting the appearance or value of nodes based on the presence or value of other nodes in the hierarchy. These constraints can be executed by either the client or the server, and valid content must comply with them.

YANG defines a set of built-in types and has a type mechanism that defines additional types. Derivative types can restrict the basic type set of valid values. They use the constraint mechanism similar to range or pattern. These constraints can be executed by the client and server.

YANG allows reusable node groups (grouping). The instantiation of these groups can refine or extend nodes, which can be tailored to specific needs. Derivative types and groups (grouping) may be defined in one module or submodule, and used in the module in which they are located or another module or submodule that introduces or contains the module.

The YANG data hierarchy contains the definition of a list, in which list entries are identified by keywords, which distinguish list entries. Such lists can be sorted by users or automatically by the system. The user sorting list defines the operations on the order of the items in the operation list.

YANG modules can be translated into an equivalent XML syntax called YANG Independent Notation (YIN), allowing applications using XML parsers and XSLT scripts to operate on the models. The conversion from YANG to YIN is lossless. Therefore, the content of YIN can be rolled back to YANG.

YANG fairly processes the relationship between high-level data modeling and low-level bit stream encoding. You can view the advanced view of the data model of the YANG module and understand how data is encoded into NETCONF operations.

YANG is an extensible language that can be extended by standard organizations, vendors, and individuals. The declaration syntax allows these extensions to coexist with the standard YANG declaration in a natural manner, and the extensions in the YANG module are prominent to be noticed by readers.

YANG maintains compatibility with SNMP SMIv2 for scalability. SMIv2-based MIB modules can be automatically converted to YANG modules that allow read-only access. However, YANG does not care about reverse YANG-SMIv2 conversion.

Similar to NETCONF, YANG aims to smoothly integrate the local management architecture of devices. This protects or exposes elements in your data model using its existing access control mechanisms.

YANG Development

The current YANG version is 1.0. Currently, the IETF NETMOD working group is designing YANG1.1. IETF working groups are also proactively promoting the standardization of the YANG model. Currently, the IETF has released some standard YANG models (IP, interface, system management, and SNMP configuration), and a large number of drafts are being evolved.

RFC 6991: Common YANG Data Types

RFC 7223: A YANG Data Model for Interface Management RFC 7224: IANA Interface Type YANG Module

RFC 7277: A YANG Data Model for IP Management

RFC 7317: A YANG Data Model for System Management RFC 7407: A YANG Data Model for SNMP Configuration

The IETF and ONF have started to require the submission of models written in YANG. Especially for IETF, all model drafts are written using YANG.

More and more vendors require YANG adaptation. Products from vendors such as Huawei, Cisco, and Juniper have provided NETCONF and YANG functions. Currently, Huawei’s unified controller supports the YANG model, which promotes development. In addition, more and more YANG-based tools are launched in the industry, such as YangTools (with new functions added) of OpenDaylight (ODL), pyang of Google, and Yang Designer.

 
Source
< Prev   CONTENTS   Source   Next >