Re: [Teas] [netmod] Question about optional data nodes in YANG

Italo Busi <> Wed, 19 May 2021 18:22 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C1BC13A1A34; Wed, 19 May 2021 11:22:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 3r_LaqwufQ-w; Wed, 19 May 2021 11:22:16 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 465CF3A192C; Wed, 19 May 2021 11:22:16 -0700 (PDT)
Received: from (unknown []) by (SkyGuard) with ESMTP id 4Flgs11fnzz6Vyck; Thu, 20 May 2021 02:10:29 +0800 (CST)
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 20:22:10 +0200
Received: from ([]) by ([]) with mapi id 15.01.2176.012; Wed, 19 May 2021 20:22:10 +0200
From: Italo Busi <>
To: 'Andy Bierman' <>
CC: "" <>, "" <>
Thread-Topic: [netmod] Question about optional data nodes in YANG
Thread-Index: AddM0kod0IYHJNBMS/G0OPlt3Ipjtv//5GkA///ZhwA=
Date: Wed, 19 May 2021 18:22:10 +0000
Message-ID: <>
References: <> <>
In-Reply-To: <>
Accept-Language: it-IT, en-US
Content-Language: en-US
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_2aea140d56b74a9e8f99044a92dcee9dhuaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <>
Subject: Re: [Teas] [netmod] Question about optional data nodes in YANG
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Traffic Engineering Architecture and Signaling working group discussion list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 19 May 2021 18:22:21 -0000

Then, what would be the difference between an optional and a mandatory data node?

In some RFC8795 implementations, the support or not support of a data node may also depend on the specific network-type so in this case the data node cannot be marked as not-supported


From: Andy Bierman []
Sent: mercoledì 19 maggio 2021 19:35
To: Italo Busi <>
Subject: Re: [netmod] Question about optional data nodes in YANG

On Wed, May 19, 2021 at 10:12 AM Italo Busi <<>> wrote:
We have got a question about how to deal with YANG optional data nodes and in particular how can a client know which optional data node has been implemented by a server.

We think that there is no issue with config=false data nodes. When the client retrieves a YANG tree from the operational datastore it will not get the data nodes that are not implemented by the server, as reported in section 5.3 of RFC8342:

If no value is returned for a given node, then
this implies that the node is not used by the device.

Is our understanding correct?

The server is expected to advertise a deviation for not-supported for every subtree
it does not implement.

       deviation /base:system/base:daytime {

         deviate not-supported;



The doubt we have is about the config=true data nodes.

How can the client know whether the server supports the configuration of an optional config=true data node before trying to configure them and getting an error message?

We understand that it is possible to know whether a YANG model or a feature of the YANG model (i.e. a group of data nodes) is supported by the server. The question is rather on specific data nodes with config=true.

We have found scenarios where it could be useful to implement a sub-set of optional data nodes (profile) of an IETF standard YANG model, but it is not very clear how a client can understand which profile has been implemented by the server.

Some examples of profiles of an IETF standard YANG model are provided in:

Thanks, Aihua and Italo

netmod mailing list<>