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

Andy Bierman <andy@yumaworks.com> Tue, 13 July 2021 15:31 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 309413A17D8 for <netmod@ietfa.amsl.com>; Tue, 13 Jul 2021 08:31:54 -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 Usnqnqzvd6zs for <netmod@ietfa.amsl.com>; Tue, 13 Jul 2021 08:31:49 -0700 (PDT)
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (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 7DCC23A17DE for <netmod@ietf.org>; Tue, 13 Jul 2021 08:31:48 -0700 (PDT)
Received: by mail-lf1-x12f.google.com with SMTP id v6so13800776lfp.6 for <netmod@ietf.org>; Tue, 13 Jul 2021 08:31:48 -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=oRFw+zr6wg/0xrM8ZetDHm6EZ4E9OgUaLIh3YOn8LTs=; b=zepwGrtk2CEQKkTuCCVuboSSQ/YB7Ci8MWWxmcWHmYEwI/1JNFs41AhEotWQ0D/NWg fQ7T3Oqkrm6HvLYuBZZlLA5rZH+cO9narxnYXGKwFvUA/OnxnGC5MGGgWBs7dmZBHj+D tz/8CAFI2z2rfRsLB8YAcCvtyo3Spor4CE8mfknI8jd9HPBQkcJ7Er7wMv03hFuRXadN rJRWeWqs84Ibs7U6OAB2aQfqFmS11Faq3KlAanWruXAQdE745FoPrKgXlWfg069XqmsC xbKcqNHrCMSDfXsOZJLpW1arXtUqYRBjHIqhRos0UDqaDHbHU+8R1Vs0z5WaU5uVecpO DZuQ==
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=oRFw+zr6wg/0xrM8ZetDHm6EZ4E9OgUaLIh3YOn8LTs=; b=P3gytNiQif8KNF+PY47eoroiixl1TqkOWEQUimArL47rVj0Sf5wlo27wUiNkNHGPq+ wXnhs5A9NqZjV1TLHKlGkZzRyVJo/o/Z9mx/9Wf5PuQywTMAMv7HdbgWUP3K5QfiPo0S ObIms6SsGKIj12qb/ET3yIHC4ReLLgFUrjYoOKBoeN1RHrDbtHy0dYplGV2zpzpHqDUP u7nLFprUGffWwrthVuUBT9WBJy/WuHqSnOO4k1idZohyg3/VoWpiTpCnm7yjHTLygSNh bFJ2/+2f/Q5HMPQH69mL3NqBECGFt8j7fwlfo9d7a4/lk+NNbHYjG2ZhgpfrNx3fPIXP lfgA==
X-Gm-Message-State: AOAM5307ulRMTjkxnfARhqTDK+Ok8JWHqwrgEU+gOqIerTkwGSVkzTaj 4xJBcs1GZyPal//gHGrmyNh0Vq0zYkcZ90kXH5836Q==
X-Google-Smtp-Source: ABdhPJxQLcBKQqXylz+MoqK0R7lCvOvcAevabV7eBDgDM9c7kWmTBpeMZZko0w7zJ92g67xUSD2O/jLNHPbkhaejW9I=
X-Received: by 2002:a05:6512:3c93:: with SMTP id h19mr3853570lfv.512.1626190306149; Tue, 13 Jul 2021 08:31:46 -0700 (PDT)
MIME-Version: 1.0
References: <CABCOCHQB8=kAXRejif=04ThzbSn87oqvDLB5=oJ2FVcAKrSg4Q@mail.gmail.com> <AM8PR07MB8230EF47ED0DB9E7B575E2A0F0149@AM8PR07MB8230.eurprd07.prod.outlook.com>
In-Reply-To: <AM8PR07MB8230EF47ED0DB9E7B575E2A0F0149@AM8PR07MB8230.eurprd07.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 13 Jul 2021 08:31:35 -0700
Message-ID: <CABCOCHTT33s4zqWZpOEkSa_dUZ+kyKVyUVGbqwmbijAmJFP7vA@mail.gmail.com>
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000891ed905c702efb9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/LQ2cdTxfu7CigcnuLroR5jelsro>
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: Tue, 13 Jul 2021 15:31:55 -0000

On Tue, Jul 13, 2021 at 8:07 AM Balázs Lengyel <balazs.lengyel@ericsson.com>
wrote:

> Hello Andy,
>
> Looking through the use-cases I think the producer will always know
> whether it includes default values or not. This is the case if the instance
> data set is produced by the server e.g. in UC4, UC5,  or if it created by
> some design activity UC1, UC2, UC3, UC8. (UC6 and UC7 are so broad and
> loosely defined it is hard to say much about them.)
>
>
>
> Once the producer knows whether defaults are included or not it can set
> the include-defaults accordingly, so the default value for include-defaults
> is not so important. However, I chose trim as the default because:
>
>    - during the WGLC the draft explicitly stated that defaults SHOULD NOT
>    be included and the WG was happy/ok with that
>    - IMHO It is better to have short files,
>
>
>



I strongly object to having a default-stmt since it does matter and
the usage is incorrect.
If the include-defaults is not set then conveying a default value of 'trim'
is incorrect.
Leaving it out of a representation does not change the semantics of the
model.
The consumer will add that leaf = "trim" if it is missing.

Andy

Note, I used the term *producer*, as IMHO the above is true in all cases
> whether the server produces the file or some design activity creates the
> server.
>
> Regards Balazs
>
>
>
> *From:* netmod <netmod-bounces@ietf.org> *On Behalf Of *Andy Bierman
> *Sent:* 2021. július 8., csütörtök 19: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
>
>
>
>
>