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

Andy Bierman <andy@yumaworks.com> Wed, 19 May 2021 17: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 0110E3A18E5 for <teas@ietfa.amsl.com>; Wed, 19 May 2021 10:35:09 -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 Wte2JabTkPFd for <teas@ietfa.amsl.com>; Wed, 19 May 2021 10:35:04 -0700 (PDT)
Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (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 756043A18E0 for <teas@ietf.org>; Wed, 19 May 2021 10:35:04 -0700 (PDT)
Received: by mail-lf1-x135.google.com with SMTP id b26so4315942lfq.4 for <teas@ietf.org>; Wed, 19 May 2021 10:35:04 -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=uev3L+ZQLhsHchGHZoFc0Eb7kTVYNnvCfZU8yJxeSow=; b=yPldtuGKoGbSGt32Jwq1d9sXNvGvijeNcn/lQI1+tLQIwOEyxhJ7jI4bNZAgtu7TPJ KICE4K0sqrjbSldl3hhd00z3u+wxX9JAOuj61oTDHGVqvrGa5n7IjdzNWEZ0VcbQZm/B Vx7jC0ysfBatBFxvUwyW3zmWI/yJICV4sXsK5A3ABE+U9xU93SX3PAFsF/I7KdXxAdp3 Wc0eyk2ZVi5AURP6qf+Sgj3XczR1LeV0uQMhTAbt6uR62xwDIVoWeZehvgCjLc+GOj40 AWxhiiwXVayauVcPCl3h2uKFg5/DceX2NmtZrOTDK4QzNgXRbvVgjnLVeWoeRI990F7L rZkA==
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=uev3L+ZQLhsHchGHZoFc0Eb7kTVYNnvCfZU8yJxeSow=; b=dbVd3rZWwLKMNSHnpuSnJNIFzgglkW3drBhEl7iqziyvD0Sv017FkGjp9f70ueZLK6 1IqVRuZAon+La3QHYvXM59qgbQdNGHQiYOTWK8+x6XcBc60L4QUzwHxYpZAPUzf7ZsDn mzXBGK6PbVPlBrl7sPucEgmqdrUEmJI1mIEZyYkoJzMyplB9EDCAkir/ybgzpFerQper vhsKgMLrmT9jr3T9wr0cxvKCXi5jORd2Jcd0ypEVJe8V/hZtrrEgjn2YlmZm4TmLpUqv rQpTQ1n2AZx77dR3Oey9zl1dDct0qHGaO0dNpHEFM7PB1kQlcGxqukvYPMAmQzFVNoc9 bntA==
X-Gm-Message-State: AOAM533ktKtntU9S/fFwXtX/WL+JTMnWpykowPseKen27zys/LYsSEp5 o23p2MJRQPZSO+7wdrWl6DVtocradxEzJswuiHGE/w==
X-Google-Smtp-Source: ABdhPJx0gHNiy8WLCab+JQrZiluFCj7QVJioyuN+CWNXOw7z2rcpXcF58xy9eypIkWUUXb140igtnFhDAYVOBBVdado=
X-Received: by 2002:a05:6512:31d1:: with SMTP id j17mr409516lfe.512.1621445697357; Wed, 19 May 2021 10:34:57 -0700 (PDT)
MIME-Version: 1.0
References: <bcb91cd543414a74a42605827bf7c71e@huawei.com>
In-Reply-To: <bcb91cd543414a74a42605827bf7c71e@huawei.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 19 May 2021 10:34:46 -0700
Message-ID: <CABCOCHR=1=Cb_rHEbn0UWDutPvVV594uaxxx8tivynwHpMqdwA@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="000000000000d0610405c2b23eb0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/teas/0JiIMbXGIZlv4ECgQ-18BBPnVKA>
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 17:35:09 -0000

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
>