Yang Model Understanding

Source: Internet
Author: User
Tags netconf
Preface

Following a few previous articles, this article shares its own understanding of the Yang model.
Read the first few articles on how to build your environment and how to write apps. one, the source of Yang

As early as 2003, the IETF set up a netconf workgroup to propose an xml-based network configuration Management Protocol, the NETCONF (Network Configuration Protocol), because the protocol's configuration is very powerful, At the same time, both monitoring and fault management, security verification and access control, so the industry has been unanimously recognized, so widely used netconfig to configure the network.

The NETCONF protocol is divided into transport layer, RPC layer, operation layer and content layer. Among them, the content layer is the only not standardized layer, so a new modeling language Yang produced, its goal is to netconf data model, operation modeling, covering the NETCONF protocol of the operating layer and the content layer
second, the basic elements of Yang Module

Module is the basic unit of Yang, is the basic framework for writing Yang files, including the following types of statements:
1, head statement (Yang-version/namespace/prefix)
2, the connection statement (Import/include),
3, Meta information (organization/contract),
4, Revision statements,
5, define the statement (container/leaf/leaf-list/grouping, etc.).
The Yang module has the following layout:

Java

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21-22 Module < module-name > {//header Information yang-version statement namespace statement prefix statement//L Inkage Statements Import statements include statements//META Information Organization statement CONTACT Statement DESC Ription Statement Reference statement//Revision History revision statements//module definitions other statements}

For example:
submodule

Submodule is part of the module definition that is used to support modules.
The Submodule file content is laid out as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.