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

Andy Bierman <andy@yumaworks.com> Wed, 19 May 2021 18:35 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: teas@ietfa.amsl.com
Delivered-To: teas@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4A51E3A1A97 for <teas@ietfa.amsl.com>; Wed, 19 May 2021 11:35:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zwLPQ9LKylyp for <teas@ietfa.amsl.com>; Wed, 19 May 2021 11:35:40 -0700 (PDT)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 585593A1A98 for <teas@ietf.org>; Wed, 19 May 2021 11:35:40 -0700 (PDT)
Received: by mail-lf1-x136.google.com with SMTP id w33so12621138lfu.7 for <teas@ietf.org>; Wed, 19 May 2021 11:35:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s+KYELBl05RY9tbENZvwCvrXNPMJZbc8sR1J4MLbLoQ=; b=1acyq4fdUk3cA2vKq6CSIr95j6Rnv95pMluSlZdSZgOwOfygemkezgcAQQAd6sH65M n0gdugALWyjeAYtBYrpuLI2X2deiaHrokkhtiK31swePUyP/CJ0IJfYQINizCTxHdJKY GrQjL/qMKDmFJ94KqkQZp4he3imWMc1VxB0vB1agtfwJ4Mq0BO/KepSaSbf1q+PcC+yA wjveqdK8o3Cp7enZeDHEIX36uqySdjZuZ5t3f+FrPAycZD4xuPbV9xvgjED3Yy5veXBH TdaYJ5Fx8yR6OWaYDjyJZ/GGGeXHzGGCTeeiXyHEyv8yruGKy7hdtybud/wkWzHXDBIZ 1IdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s+KYELBl05RY9tbENZvwCvrXNPMJZbc8sR1J4MLbLoQ=; b=bPR3KU3uQpqcQ59/cauJ4uZA0UniX+OKSfO+zHkHa/KBpEnOmkyh0tApJs+8MHQb2z 8c0j/feRYTuLsGGDHPLdvMiNSo2wSULn0zXfaBK0fYiwKrePzUdGm8I5JWhi1u158xWO XUcMg71/gpGrOqT+yKtDl78NJVG8roOVdKi44adWO5bBF85hreVtT1wFogPSiI3dS9PM 89n4wQV/CRoa479iGusQb/vDsAe28wk/dqK4H9RMT8oZoYgIxxs5oAs62CS17fjako0v RcRNt/bAjATehHV9D2dhxftF7gRJ0kElGOtyPU7pJvk+SIoGIgEF7EK/bSUMJDsvlj9E 0ctg==
X-Gm-Message-State: AOAM532c2L6DpnuKEggLJ5jPaG+9Ika6i8XhVR63OOnOuAaXDOAGmTUN rcg9zZb0wANEPOUpUWkAZ0mPwaxPyDeuuej0c4qIPQ==
X-Google-Smtp-Source: ABdhPJyP7fZPt15UmWj/fi8JGykqpmlXiZcsNP76pSfUKHUAuL9tX0jp2Ky0+HP3gfaaxI1GpEqoNH80Tzst8Rkkbqc=
X-Received: by 2002:a05:6512:471:: with SMTP id x17mr559147lfd.553.1621449337820; Wed, 19 May 2021 11:35:37 -0700 (PDT)
MIME-Version: 1.0
References: <bcb91cd543414a74a42605827bf7c71e@huawei.com> <CABCOCHR=1=Cb_rHEbn0UWDutPvVV594uaxxx8tivynwHpMqdwA@mail.gmail.com> <2aea140d56b74a9e8f99044a92dcee9d@huawei.com>
In-Reply-To: <2aea140d56b74a9e8f99044a92dcee9d@huawei.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 19 May 2021 11:35:26 -0700
Message-ID: <CABCOCHSzPQdNVhku5ivFSogTuJgYo8PYinUfT5MSXoRDv1Q-8w@mail.gmail.com>
To: Italo Busi <Italo.Busi@huawei.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>, "teas@ietf.org" <teas@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000cd6b3205c2b31709"
Archived-At: <https://mailarchive.ietf.org/arch/msg/teas/MMJCoikqIsDq8i4qHSIVc-_I2eo>
Subject: Re: [Teas] [netmod] 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 18:35:45 -0000

On Wed, May 19, 2021 at 11:22 AM Italo Busi <Italo.Busi@huawei.com> wrote:

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

Do not confuse "mandatory to implement" with "mandatory that a node be
present".

Mandatory to implement is easy:  If there is an if-feature conditional that
is applied to
a node or one of its ancestors, then it is optional to implement. Otherwise
it is mandatory to implement.


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

This is a different issue.
Server capabilities specific to a data model should be handled in a related
module.


Italo
>
>
>

Andy


> *From:* Andy Bierman [mailto:andy@yumaworks.com]
> *Sent:* mercoledì 19 maggio 2021 19:35
> *To:* Italo Busi <Italo.Busi@huawei.com>
> *Cc:* netmod@ietf.org; teas@ietf.org
> *Subject:* Re: [netmod] Question about optional data nodes in YANG
>
>
>
>
>
>
>
> On Wed, May 19, 2021 at 10:12 AM Italo Busi <Italo.Busi@huawei.com> 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.
>
>
>
> https://datatracker.ietf.org/doc/html/rfc7950#section-7.20.3.2
>
>
>
>
>
>        deviation /base:system/base:daytime {
>
>          deviate not-supported;
>
>        }
>
>
>
>
>
> Andy
>
>
>
>
>
>
>
> 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:
>
>
>
> https://datatracker.ietf.org/doc/html/draft-busi-teas-te-topology-profiles
>
>
>
> Thanks, Aihua and Italo
>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
>