Re: [netmod] yang-instance-file include-defaults leaf

Andy Bierman <andy@yumaworks.com> Sat, 10 July 2021 16:41 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BD1B93A16F2 for <netmod@ietfa.amsl.com>; Sat, 10 Jul 2021 09:41:19 -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 GsrMR-OjImdv for <netmod@ietfa.amsl.com>; Sat, 10 Jul 2021 09:41:15 -0700 (PDT)
Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 B65913A16DD for <netmod@ietf.org>; Sat, 10 Jul 2021 09:41:14 -0700 (PDT)
Received: by mail-lf1-x12b.google.com with SMTP id q18so30649609lfc.7 for <netmod@ietf.org>; Sat, 10 Jul 2021 09:41:14 -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=2UChUD/QJa00LO1Cz9Ycl37K9hiyUQHWnQ1XBKXq3cw=; b=NVJB+CdwOm/czhXut09YWHZ9IMIZuYntjSKGIytKu4rPSldECuUHPjxIqt3YgI82Qs VtU1/pmmUDTekz57+pqcbnhV7fnwnaqM9tsWB3pVpiw4QqMvd0pen7csTooUWAByDJxW qWtkvggSvgyX78Rq2et/U+UHVTVxbKs3LxD0umUz0Qr6tJKwX4TL2/Un9m0RhMD9tBVR s1hXolaJYu37mAw2PdUggprUIRpmYdcXU01N6Nx1WQlxWm9TUzdF5+B5ofFZk1dsyt9V OUIz/ZWJeNYIqK7TOyJzFueS7ZZrAtlPy0QQ4Z6fjjIBO4Jkh/2NV2tszM6tFWDAxwmb SVCQ==
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=2UChUD/QJa00LO1Cz9Ycl37K9hiyUQHWnQ1XBKXq3cw=; b=RILT+u3AkuUX3AU7Sv00g3FpObumI9JMeF9LcUxwlTtXZQYBTmZ2AnoiyX4VxI/x4K Y/iEv1d6u7FIO2fBpu5AyY0Sj+uwJDU+rpSgGZMuWP5tnbW60OFCFU+HwWEsUwd6A8qx W2CUqF4aVKFrRwqoF6sQGpEutxWICycxcnx7/3CIR1EE/oVtTqbwjB/d1VSFqCYJY9XM lp8n8nYHhcff56p+cLTHgI+dWtXBxatn51AvoLNPsFEqXApv7dAAcpYmd9lpH4+IL8gy EWcHTsAkltgfAz9AmklUKHty5XPYBEN0VxTE5l0sZhflIm4DFZttoVqSEFzbvb/rup9M mKUg==
X-Gm-Message-State: AOAM530MdNTBK+H0KEJiqwdGGuxYZL803oygTTnH1dDsn7HSs7gLCjd3 Tb2sZSEDGTh5cf9w/VxgfjAqkOUgxuvo8tVkG91F2Q==
X-Google-Smtp-Source: ABdhPJzgQQtTrtE3/Hc2fRB2bcz4gBsyOOizeQLn6OGRPOhSsEHJQ+f4ieYhco+ikgb+s57kkJCajeLDkkcrzToj9F8=
X-Received: by 2002:a05:6512:3745:: with SMTP id a5mr32983800lfs.478.1625935271131; Sat, 10 Jul 2021 09:41:11 -0700 (PDT)
MIME-Version: 1.0
References: <CABCOCHQB8=kAXRejif=04ThzbSn87oqvDLB5=oJ2FVcAKrSg4Q@mail.gmail.com> <DM4PR11MB5438F5874CDEB4D78C9A5695B5189@DM4PR11MB5438.namprd11.prod.outlook.com>
In-Reply-To: <DM4PR11MB5438F5874CDEB4D78C9A5695B5189@DM4PR11MB5438.namprd11.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sat, 10 Jul 2021 09:41:00 -0700
Message-ID: <CABCOCHRwzRajMmSd2mArLeLr8OOxTdLEid3bEDdVH0vgNysTfg@mail.gmail.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: NetMod WG <netmod@ietf.org>, Balázs Lengyel <balazs.lengyel@ericsson.com>
Content-Type: multipart/alternative; boundary="00000000000043910e05c6c78e9c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/qeRVpGQqO_k55IxHQQ2q4v3tU1M>
Subject: Re: [netmod] yang-instance-file include-defaults leaf
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Jul 2021 16:41:20 -0000

On Fri, Jul 9, 2021 at 5:23 AM Rob Wilton (rwilton) <rwilton@cisco.com>
wrote:

> Andy,
>
>
>
> Yes, when I suggested this, I was thinking that a boolean flag might be
> sufficient.  My point being that automatically filtering out default values
> isn’t always the right thing to do.
>
>
>


The solution is simple.
Get rid of the inappropriate "default trim" statement.

If the leaf is present then it identifies the basic-mode that was used to
include defaults.
If not then the information is either not known, not applicable, or
defaults were not added.

The "default" statement is a bug because there is no default basic-mode.
All of the basic-modes are in use in deployments and no camp has ever
been able to convince the others that theirs is right.


Andy


> E.g., something along these lines:
>
>
>
> leaf exclude-defaults {
>
>   type boolean;
>
>   default true;
>
>   description
>
>     “Can be used to reduce the size of the content data file.
>
>
>
>       When unset or set to true, data nodes that have a default defined and
>
>       where the actual value is the default value are excluded from the
> content
>
>       data.
>
>
>
>       When set to false, data nodes with default value are not filtered,
> and
>
>       may appear in the content data.”
>
> }
>
>
>
> Would this satisfy your concern?
>
>
>
> Regards,
> Rob
>
>
>
>
>
> *From:* netmod <netmod-bounces@ietf.org> *On Behalf Of *Andy Bierman
> *Sent:* 08 July 2021 18:16
> *To:* NetMod WG <netmod@ietf.org>
> *Subject:* [netmod] yang-instance-file include-defaults leaf
>
>
>
> Hi,
>
>
>
> The module has this object:
>
>
>
>     leaf includes-defaults {
>
>        type enumeration {
>
>          enum report-all {
>
>            value 1;
>
>            description
>
>              "All data nodes SHOULD be included independent of
>
>                any default values.";
>
>          }
>
>          enum trim {
>
>            value 2;
>
>            description
>
>              "Data nodes that have a default defined and where
>
>                the actual value is the default value SHOULD
>
>                NOT be included.";
>
>          }
>
>          enum explicit {
>
>            value 3;
>
>            description
>
>              "Data nodes that have a default defined and where
>
>                the actual value is the default value SHOULD NOT be
>
>                included. However, if the actual value was set by
>
>                a NETCONF client or other management application
>
>                by the way of an explicit management operation the
>
>                data node SHOULD be included.";
>
>          }
>
>        }
>
>        default trim;
>
>
>
> The draft is extremely server-centric, like most IETF standards, but this
>
> leaf is too server-centric to ignore.
>
>
>
> Consider the possibility that the source of the file is NOT a NETCONF
> server.
>
> This data may not be known so the default of "trim" may not be correct.
>
>
>
> IMO this leaf is noise because any tool that knows the schema will also
>
> know the YANG defaults.  The solution is incomplete anyway because
>
> the presence of a leaf that has a YANG default is not enough.
>
> The  "report-all-tagged" mode must be used to identify defaults.
>
> IMO this leaf should be removed, but at least add an enum called "unknown".
>
>
>
>
>
> Andy
>
>
>
>
>