[Teas] Question about optional data nodes in YANG

Italo Busi <Italo.Busi@huawei.com> Wed, 19 May 2021 17:12 UTC

Return-Path: <Italo.Busi@huawei.com>
X-Original-To: teas@ietfa.amsl.com
Delivered-To: teas@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 92E773A1826; Wed, 19 May 2021 10:12:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=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 mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id afgSlp-5vBvI; Wed, 19 May 2021 10:12:29 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 727513A1824; Wed, 19 May 2021 10:12:29 -0700 (PDT)
Received: from fraeml711-chm.china.huawei.com (unknown []) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FlfN36zQkz6V09q; Thu, 20 May 2021 01:03:47 +0800 (CST)
Received: from fraeml715-chm.china.huawei.com ( by fraeml711-chm.china.huawei.com ( 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 19:12:21 +0200
Received: from fraeml715-chm.china.huawei.com ([]) by fraeml715-chm.china.huawei.com ([]) with mapi id 15.01.2176.012; Wed, 19 May 2021 19:12:21 +0200
From: Italo Busi <Italo.Busi@huawei.com>
To: "'netmod@ietf.org'" <netmod@ietf.org>
CC: "teas@ietf.org" <teas@ietf.org>
Thread-Topic: Question about optional data nodes in YANG
Thread-Index: AddM0kod0IYHJNBMS/G0OPlt3Ipjtg==
Date: Wed, 19 May 2021 17:12:21 +0000
Message-ID: <bcb91cd543414a74a42605827bf7c71e@huawei.com>
Accept-Language: it-IT, en-US
Content-Language: en-US
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_bcb91cd543414a74a42605827bf7c71ehuaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/teas/1p39W3ddO49fL2VI3BuUKzPWx0Y>
Subject: [Teas] Question about optional data nodes in YANG
X-BeenThere: teas@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Traffic Engineering Architecture and Signaling working group discussion list <teas.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/teas>, <mailto:teas-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/teas/>
List-Post: <mailto:teas@ietf.org>
List-Help: <mailto:teas-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/teas>, <mailto:teas-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 May 2021 17:12:33 -0000

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 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