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

"Rob Wilton (rwilton)" <rwilton@cisco.com> Tue, 27 July 2021 17:47 UTC

Return-Path: <rwilton@cisco.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 31C543A0DBC for <netmod@ietfa.amsl.com>; Tue, 27 Jul 2021 10:47:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.595
X-Spam-Level:
X-Spam-Status: No, score=-9.595 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=ZMdWkbqa; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=No82mSX7
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 V3MNSBjUayZm for <netmod@ietfa.amsl.com>; Tue, 27 Jul 2021 10:47:12 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 007A83A0DB7 for <netmod@ietf.org>; Tue, 27 Jul 2021 10:47:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=50098; q=dns/txt; s=iport; t=1627408031; x=1628617631; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=koRsFCOZxwhl8fKgm4V0zri45IfscNUlUih8qmVgS00=; b=ZMdWkbqaH+r/TcK/7us7ZVyMVqnKt7eDGwbH7Ds5496AiRj+B9F3kiGo AKfXEKzGzT983lZ5Pif9PszI9n6jHKAc5Aohgx3qm8hyf1yI4N0il04zi j9TYUbdsjdZlw94IRfxC14nLPgcl/w0TSQURBgsmWw/CUo/JMoBL+nevJ U=;
IronPort-PHdr: A9a23:RLgpcx31eDDwA5MpsmDPTVBlVkEcU/3cLxMQ44UgkbFVNK+k+seqME/e4KBri1nEFcXe5ulfguXb+6bnRSQb4JmHvXxDFf4EVxIMhcgM2QB1BsmDBB7qMfvjcCsgH98EX1hgrDm3NEFPE5P4YFvf6nS58T8VHED5Mgx4buT4E4LflYK5zee3rpbSeA5PwjG6ZOAaEQ==
IronPort-HdrOrdr: A9a23:6XAbb6HREhppJWNdpLqFSpHXdLJyesId70hD6qkvc31om52j+fxGws516fatskdvZJkh8erwX5VoMkmsi6KdgLNhfItKOTOHhILGFvAY0WKP+UyEJ8S6zJ8g6U4CSdk/NDSTNykBsS+S2mDReLxMrKjlgcKVbKXlvgpQpGpRGsddBnJCe36m+zpNNXB77PQCZf6hz/sCgwDlVWUcb8y9CHVAdfPEvcf3mJXvZgNDLwI76SGV5AnYq4LSIly95FMzQjlPybAt/SzuiAri/JiutPm911v1y3LT1ZJLg9Hso+EzRvBky/JlbwkEuDzYI7iJaIfy+gzdZ9vfsWrCpeO85yvI+f4Ds085MFvF+icFkDOQoQrGo0WSuWNwx0GT+/AQgFkBepZ8bUUzSGqF16NohqAO7Itbm22erJZZFhXGgWD04MXJTQhjkg6urWMlivN7tQ0TbWIyUs4bkWUkxjIeLH7AJlOM1Kk3VO11SM3M7vdfdl2XK3jfo2l02dSpGnA+BA2PTEQOstGcl2E+pgE382IIgMgE2nsQ/pM0TJdJo+zCL6RzjblLCssbd7h0CusNSda+TmbNXRXPOmSPJkmPLtBKB1vd75rspLkl7uCjf5IFiJM0hZTaSVtd8XU/fkr/YPf+lKGjMiq9CVlVeA6dhP22y6IJz4EUdYCbRxFrEmpe4fdIi89vdvHmZw==
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BIGQDZRQBh/5xdJa1QCh4BAQsSDIIOC4EjMCMuB3daNzGER4NIA4U5iF4DmjKBLhSBEQNUCwEBAQ0BAUEEAQGEWAIXgmcCJTUIDgIEAQEBEgEBBQEBAQIBBgR7E4VoDYZCAQEBAQMSEQoTAQE3AQ8CAQYCEQQBASEBBgMCAgIwFAkIAgQOBQgTB4JQgX5XAy8BjRSPNAGBOgKKH3qBMoEBggcBAQYEBIUwGII0CYE6gnyEDQEBhmMnHIFJRIFYgmI+hA8IEwIaNIJhNoIMIoJpgRcEJzCBeRKSDoNNiDqDZolUkhYKgyaeWRKmY7YlhHQCBAIEBQIOAQEGgWEBOSs+cHAVgyRQGQ6OHwwWg0+KXnM4AgYBCgEBAwmKSQEB
X-IronPort-AV: E=Sophos;i="5.84,274,1620691200"; d="scan'208,217";a="899108454"
Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 27 Jul 2021 17:47:09 +0000
Received: from mail.cisco.com (xbe-rcd-004.cisco.com [173.37.102.19]) by rcdn-core-5.cisco.com (8.15.2/8.15.2) with ESMTPS id 16RHl9Hn021939 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Tue, 27 Jul 2021 17:47:09 GMT
Received: from xfe-aln-001.cisco.com (173.37.135.121) by xbe-rcd-004.cisco.com (173.37.102.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 27 Jul 2021 12:47:09 -0500
Received: from xfe-aln-002.cisco.com (173.37.135.122) by xfe-aln-001.cisco.com (173.37.135.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 27 Jul 2021 12:47:08 -0500
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (173.37.151.57) by xfe-aln-002.cisco.com (173.37.135.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15 via Frontend Transport; Tue, 27 Jul 2021 12:47:08 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OYgJqSYbt7D5gV7UBlGqG2jhNMPKVishGq3IDk6Ypz1t5Knd6T4nH5DrEzZtLxe5WOr0Z/kFwnsHU2hPJwQLSHluOSm8dmSYJStYQxpyZ4/tzy29DejUOKKyCxZ3jYz51b6PLe1KdPApSFH20dG8g4LLJB9glbpe4tlsJUv6AQ+AjlafyUDV9MMW18rLwX3DNNK0AMri0xwJWFx74AReEWxbPkEUzhKkZsMksn2JjyliBT1krxeEIS3H91d7Vk6YZfPqvgXGazjFvfn62M1+2XuYDZAD8BtbIijwU0Y11gUUTqxo/+idenpCdro/iRmWicuooWfujs/ovCz8WLLL5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=koRsFCOZxwhl8fKgm4V0zri45IfscNUlUih8qmVgS00=; b=MnbH8asZzrj6UgtTyXUcbWMYFXIW1byviDp3FMVg7McpbdmIaRrhT0Ov8oyfQ/z/1iUrfbIPi6N6dkZaEU82IC4h3PpSmEEuhau2yV6NOSZgXp/XqHGvvtdONSDFlz/UNSk9W3f0LyhGxsBvSsq4PaNX9rnimrhCMjR+OX+2jQPo7kAC24CQwWcDp2oboStC1nMGCU9171kUd/8SL4Rg9gF6xCqHrGcVlgVDrRZM+mkx4eIFU6/iX3NFd0KHOS/Euwn6YjH0Pm0VN6L0abI0m59bLcVlvwujXOaifjhGkzgDEd0kgcXesK3OedsoO+e4iebyzX+2Aw48SfXMH6v3lw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=koRsFCOZxwhl8fKgm4V0zri45IfscNUlUih8qmVgS00=; b=No82mSX7SzGXfDo55uPBNBRrx44Z4Y6nixErg6JRafiyQRaDbf/o9HYBpZ1+Fj5K87Tuw1M2NH3BIwLN+O78NtfYFoUcuNR3aP5Fcvo0KIO0/dRPGYT+8YDrzPxmdId6FI9IxjZ9NQloqVcijkmC4AjOHpvTnF6z82/+5iEckFg=
Received: from DM4PR11MB5438.namprd11.prod.outlook.com (2603:10b6:5:399::21) by DM6PR11MB3691.namprd11.prod.outlook.com (2603:10b6:5:146::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Tue, 27 Jul 2021 17:47:07 +0000
Received: from DM4PR11MB5438.namprd11.prod.outlook.com ([fe80::a85a:cb8b:2d73:5e12]) by DM4PR11MB5438.namprd11.prod.outlook.com ([fe80::a85a:cb8b:2d73:5e12%7]) with mapi id 15.20.4373.018; Tue, 27 Jul 2021 17:47:07 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Andy Bierman <andy@yumaworks.com>
CC: Balázs Lengyel <balazs.lengyel@ericsson.com>, NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] yang-instance-file include-defaults leaf
Thread-Index: AQHXdB0ZnZibUXpuT0+6mfsyEmKi+6s6kMRwgAHbvACAGptLcIAAIaCAgAAMfYA=
Date: Tue, 27 Jul 2021 17:47:07 +0000
Message-ID: <DM4PR11MB5438E049D0AAE4184F5F2B8FB5E99@DM4PR11MB5438.namprd11.prod.outlook.com>
References: <CABCOCHQB8=kAXRejif=04ThzbSn87oqvDLB5=oJ2FVcAKrSg4Q@mail.gmail.com> <DM4PR11MB5438F5874CDEB4D78C9A5695B5189@DM4PR11MB5438.namprd11.prod.outlook.com> <CABCOCHRwzRajMmSd2mArLeLr8OOxTdLEid3bEDdVH0vgNysTfg@mail.gmail.com> <DM4PR11MB5438FBF7837C1147D786964CB5E99@DM4PR11MB5438.namprd11.prod.outlook.com> <CABCOCHR=fq2fqw1Lr1kbyegz-K0J-gYdOsPFgELafNWquZ+Whw@mail.gmail.com>
In-Reply-To: <CABCOCHR=fq2fqw1Lr1kbyegz-K0J-gYdOsPFgELafNWquZ+Whw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: yumaworks.com; dkim=none (message not signed) header.d=none;yumaworks.com; dmarc=none action=none header.from=cisco.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 5f2227c3-b1f4-446f-5bbe-08d951268d6d
x-ms-traffictypediagnostic: DM6PR11MB3691:
x-microsoft-antispam-prvs: <DM6PR11MB3691907CC7E361642E7D93D9B5E99@DM6PR11MB3691.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:5236;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Jo7HMmjKO7YZepj0QTWsc9Sl85ovYzHYSo679w+Fvh9W00zuq3cxZurkeyh85+0oRLV8Do7ko+szXmuUNkoN/P8uEtQA1KhNLh6k8tAioOPkqipVue8GniWD9IY24Y4GcilfvzjkKyI2vyMG2nn/PrGYEy9ICAEVMBf/kL/OBVnewD49BN0S111pi4hbo9YKW7wAG2rXWTD210zCB3RPKTQSMTHiXujVKjzf3aPcFVSGQdRIzziCK1Y8gjweXBVi+jKUqc9PsYXcB/RoT0Dt2ElrjXyAufgRnmQmrxvnInvv6X7bIUoxdPXNkFBD1BH5I+auNm2A3P4uGl0EP9blSZ/fUBZtxO9ThTH85V21w05LVZgaef9JqgkWCXJAJuCqj7XUZNuC7ax2mc8yds8d/fPmXKBJNfMPkJF0UE49L6LeG+SGplufMYpckq3jlU6/N8K2ijBaH5u+pnhsRJQfGTXUbNaWgPZxMuOqMHz7xLHNGCVOUbr0L5YVxqL+qFMIxc1nFWtgA1sbOgMzv94J6Ftvv9+mAMKsnE0krUkmYS+dZdkCpSAPfRInzROdi4BUx2+s9yC4PGk6vUvML6L2rbr2PNEr5oHfE36md1OHyWCq1BsQWLHJxcPFKrhyTQDqw4iGcNYxkp9QS8vGjYB+vnph/S8ShalBIe9rViD/fujw1aHW16AnlFSQg7jBWSDKOZqp8DRyClGMrazU1FHy8g==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5438.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(136003)(346002)(376002)(366004)(39860400002)(122000001)(7696005)(52536014)(55016002)(38100700002)(33656002)(6506007)(53546011)(26005)(5660300002)(71200400001)(4326008)(86362001)(54906003)(186003)(9326002)(76116006)(66476007)(83380400001)(8936002)(64756008)(66556008)(66446008)(2906002)(478600001)(6916009)(9686003)(316002)(66946007)(8676002)(38070700004); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 7/63J9xO6sANg7Sj6aiFhRnX++UihWAnJDVEOhSgU2dtCuwUX1MiifzM+H7O0gE1vu5x+EKHZugoQvkUe2sv8YUZNki05s4HGJ059hbr7+yzR6veQt49N+xdWHNXvyxyO2Af9wW654inBjqFgbcevMSNDChzo9LmyXfgL4s8dZiALbUTEkHFdTiJcvDCFIp1bWIUu+AiFMBSs/m8HrvCAQdROx8eoHgkd7ykVrFoYhC9JHeMSsMm0+93F8UJAdkc5lt7lRXgAKZLHdc3xSVjtO0KOnM/a8ctllXSOH0U4ringSPp+5WelkbjIxetV2YdhbdqOHblEbP1ARjXUicOHvSttoKqoYiEma/OrLkX42TOaXGuSNeh5OWBsRcEV+ehrAk5+NdWOVxTsgZiw3gCpThTkMMjUz5HwfbDs3CTBeSrv6UyTbe00pZkGmTW0DqBnsoGjuIetsicoiAlSyRMDIhYZU0Of00Kc7OlhEQf+b7ANezW3qsivw6VIGgTCTYLjNBYQGOR8wfIwBhFt2Sh91Vq+aclXH0T28v5/ASM3XGhnEPYOjL+zYYWxkYdF6tQEAdgMYEdP2O8yMHFi0H98EHLTahQcAGx3RJECBf0g9h7mTdPtE9O+LC3aptmw15o4t4TzzmdoweXCX/tN4iZwupCpGTWLJ7/ZDkN3W5GlO+Skko2IpqdIqmA6apZ2CJV78dEMfjLY9QcvuzoIxM9+ZoYhEZlN12bTnDMH37hdKyJu6OIOUlYR7RiblXDCX2LvasLBnRnmVEVHXPq1vJv4939QrgIOlWEa1hc25/90B9D4rsrUqy2bNalzixbxhK7qpcap8J/pxZB2mDURjWhMK4AyZEoYwp2h+vK8H5auooFtqjl4roCWzKjlq+g3V6JOq+WQ0gKVF5stmlZyncsskOwLFRjgQz9yvYpBQJP9sL10wFvkDHKFNLeWfVsTuMZe0Z5sOTpATMv4sO5lYMiDW4fW3dP1hqDABdxBr91a6Yy7cmgdfxEv7vHacx7hjKXBos0w58nMDHmuW+61n91e0JQUr2yh/jk9ZvYsW71btUN0tTZI02MzqC6OCwfn3z7VrbIIMu+4VMeVQff3hhQizjEPwSdOaS73rJOEgw9R87dsP8AZ0D5oZGYrdU4sVs+6eaD9cbBrbwWsIqd0qFHUrFSSJk67Kl1zksF2qbawfI207yTYJQFSjkkmb+gLUxQVJpiUROiEPQK77fLM2Ae1SM16wGa08+qK7FRhnsuECRhJuOvpE0JW00rUDnTXeqI4M9FLy+cmxG4rOwM1xHkwulnLyNWFwsVlzBHLK138B1Z78lhdYIK9RVMKNjYl5QD
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM4PR11MB5438E049D0AAE4184F5F2B8FB5E99DM4PR11MB5438namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5438.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5f2227c3-b1f4-446f-5bbe-08d951268d6d
X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2021 17:47:07.1503 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: hbUbUzZRGtTXnNILwexnl1z2Je4cK1ZfVV+GDDwrEHU0zGmpzIMe6K6ohmtn51Y87IjxRBx/aylD2fq8HusGlQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3691
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.19, xbe-rcd-004.cisco.com
X-Outbound-Node: rcdn-core-5.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/3Hzbqyn2VIcZ9NDed2bHG81580s>
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, 27 Jul 2021 17:47:18 -0000

Hi Andy,

The comment at the end of my email was:
“With this, I’m not sure whether we need the “includes-default” leaf currently specified in the draft, but if we do, then I would think that leaf should be entirely optional, i.e., without the default “trim”.”
Regards,
Rob


From: Andy Bierman <andy@yumaworks.com>
Sent: 27 July 2021 18:00
To: Rob Wilton (rwilton) <rwilton@cisco.com>
Cc: Balázs Lengyel <balazs.lengyel@ericsson.com>; NetMod WG <netmod@ietf.org>
Subject: Re: [netmod] yang-instance-file include-defaults leaf

Hi,

None of this addresses my point that a default value of "trim" is not appropriate.
Simply remove the default-stmt so that a missing leaf instance means that
no information is provided, rather than meaning defaults were added for basic-mode=trim.


Andy


On Tue, Jul 27, 2021 at 8:38 AM Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>> wrote:
Hi Andy, Balazs,

So, the reason that I want a flag to indicate whether default values are in use is because of this definition of operational in RFC 8342:

   Requests to retrieve nodes from <operational> always return the value
   in use if the node exists, regardless of any default value specified
   in the YANG module.  If no value is returned for a given node, then
   this implies that the node is not used by the device.

It was written this way because otherwise a consumer of operational data cannot differentiate between:

(i)                  This value is not present because it matches the default value specified in the YANG module, and

(ii)                This value is not present because the server has failed to return it for some reason (e.g., perhaps the daemon that would have provided this value is down or not available, or perhaps it is a bug, or perhaps it is not implemented and is a missing deviation).

So, I think that in some cases, the absence of a data node does not necessarily mean that the default value is in effect, and I wanted the instance-data document to be able to contain and correctly report this data.

I think that this behaviour could be captured by a single leaf.  Another way of articulating this would be:

leaf in-use-values {
  type boolean;
  default false;
  description
    “Only if set to true, the absence of a value in the
     instance data for a given data node implies that the
    node is not used rather than implicitly taking the
     default value specified by any corresponding
    ‘default’ statement specified in the YANG schema.”;
}

With this, I’m not sure whether we need the “includes-default” leaf currently specified in the draft, but if we do, then I would think that leaf should be entirely optional, i.e., without the default “trim”.

Regards,
Rob


From: Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>>
Sent: 10 July 2021 17:41
To: Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>>
Cc: NetMod WG <netmod@ietf.org<mailto:netmod@ietf.org>>; Balázs Lengyel <balazs.lengyel@ericsson.com<mailto:balazs.lengyel@ericsson.com>>
Subject: Re: [netmod] yang-instance-file include-defaults leaf



On Fri, Jul 9, 2021 at 5:23 AM Rob Wilton (rwilton) <rwilton@cisco.com<mailto: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<mailto:netmod-bounces@ietf.org>> On Behalf Of Andy Bierman
Sent: 08 July 2021 18:16
To: NetMod WG <netmod@ietf.org<mailto: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