YANG-library

The YANG-library capability indicates that a device can provide the YANG capabilities that the device supports. Basic information about YANG modules that a server supports can be viewed on a NETCONF client. The information includes the module name, YANG model version, namespace, and list of submodules and is saved in the local buffer.

Field description:
  • revision: revision date. It is the same as the module revision date.
  • module-set-id: module set ID. It indicates a set of YANG modules that the server supports. If a YANG module changes, the ID changes.

XML example: Query the module-set-id value of the YANG module whose name is ietf-yang-library and conformance-type is implement and query basic YANG module information of the YANG module huawei-aaa.

RPC request:

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="23">
 <get>
  <filter type="subtree">
   <modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
     <module-set-id></module-set-id> 
      <module>
       <name>ietf-yang-library</name>
       <conformance-type>implement</conformance-type>
      </module>
      <module>
       <name>huawei-aaa</name>
      </module>
    </modules-state>
  </filter>
 </get>
</rpc>

Information contained in the reply includes the module-set-id value, YANG module version used, namespace, list of submodules, and revision date. If the reply does not contain the YANG module version information, YANG1.0 is used by default.

RPC reply:

<?xml version="1.0" encoding="utf-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
    <module-set-id>2148066159</module-set-id>
    <module>
      <name>ietf-yang-library</name>
      <revision>2016-06-21</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-library</namespace>
      <conformance-type>implement</conformance-type>
    </module>
    <module>
      <name>huawei-aaa</name>
      <revision>2017-03-23</revision>
      <namespace>urn:huawei:yang:huawei-aaa</namespace>
      <conformance-type>implement</conformance-type>
      <deviation>
        <name>huawei-aaa-deviations-cx</name>
        <revision>2017-03-23</revision>
      </deviation>
      <submodule>
        <name>huawei-aaa-action</name>
        <revision>2017-03-23</revision>
      </submodule>
      <submodule>
        <name>huawei-aaa-lam</name>
        <revision>2017-03-23</revision>
      </submodule>
      <submodule>
        <name>huawei-aaa-lam-action</name>
        <revision>2017-03-23</revision>
      </submodule>
      <submodule>
        <name>huawei-aaa-lam-type</name>
        <revision>2017-03-23</revision>
      </submodule>
      <submodule>
        <name>huawei-aaa-type</name>
        <revision>2017-03-23</revision>
      </submodule>
    </module>
  </modules-state>
</data>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >