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

Balázs Lengyel <balazs.lengyel@ericsson.com> Wed, 28 July 2021 21:56 UTC

Return-Path: <balazs.lengyel@ericsson.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 5257F3A2309 for <netmod@ietfa.amsl.com>; Wed, 28 Jul 2021 14:56:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.552
X-Spam-Level:
X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 hn1Cf-6Rn-af for <netmod@ietfa.amsl.com>; Wed, 28 Jul 2021 14:56:45 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2061.outbound.protection.outlook.com [40.107.21.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5F9DA3A2303 for <netmod@ietf.org>; Wed, 28 Jul 2021 14:56:45 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VytC/UG61srSFiIH/0eYFKrHNhXimVcDlssz9Tj6CnWghqyqnPtqb+pmWLBWKUM1NFyBOG2K1VkYEKhnorp01BU+0sgvMTp5Fz3ohAL5nQtRBuuORBJF8gkPGjnqcVcfNnwKSbMeIOKRc7F1PvuaZtRcxoKGc0qO65XfjSCGR59nSDptAH5eBWOxewLbUyPmI0hphkn4tUGd1I5N7fCLbb6OsFxv0OtKsyqikjp2B9Jd61XhbPQXkK0zqq6gEqQb7S9pC8agGLl/EOZB/273slvgqXOVY6fTfcerCwX3QrM8ooc+eoipF5B981K/zSieV84/rqsuxzjNruS3GwRRJA==
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=mFkGYUM5prqytjzGneVqqO9YPIqTNHlXhy9Y/Vrgevg=; b=bIpxOtGDYWsAXyp+SORGlfIQKoWP6oxc7R/b0roPGCXj/Mf7NHkntjCVyppFGgcGkhS/QP+Cx0cKwO5in3Sl1/Vkgviw4UMlbjcWox5/aVYr0smJLfgr4jTPWV0vIlrOL07FZYD7d58Pe3PCl9XTTZLsbFtvPS6Uqnrlo0y07robNqtMcfIpJ/he7dwilBXrTOO7AwoqV449B5l3WklIfAdF1CxiRoKOgFAxlJTvA1c2cH8eNWitXernj0q3XE9HsZpYbn/4xvxWVGl8dxttqLUdUSIkZOX5Hhw6MQB/FCL4ylPbdif12E0yKZ+bT4EnzO1no/uwn8UyrwJHzyU4zg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mFkGYUM5prqytjzGneVqqO9YPIqTNHlXhy9Y/Vrgevg=; b=VOC/ncUHX8+xDZoChceR+rkkfxUNDreozHxstX9BdK40fMMGmomaNq6c8bbXeCFB7gxfKl3YhxT0mZuBzSzXqzt/IsPvRybrHb5d3G7pPglrpZXy206jHS9RF6l3wcBe24QKbuU9LQKu4c8fm0PODzkGNxmeGT/i6BkeFfstdaQ=
Received: from AM8PR07MB8230.eurprd07.prod.outlook.com (2603:10a6:20b:325::15) by AM8PR07MB8171.eurprd07.prod.outlook.com (2603:10a6:20b:322::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.11; Wed, 28 Jul 2021 21:56:42 +0000
Received: from AM8PR07MB8230.eurprd07.prod.outlook.com ([fe80::dd5e:8a67:d8c3:4625]) by AM8PR07MB8230.eurprd07.prod.outlook.com ([fe80::dd5e:8a67:d8c3:4625%9]) with mapi id 15.20.4373.018; Wed, 28 Jul 2021 21:56:42 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Andy Bierman <andy@yumaworks.com>, "Rob Wilton (rwilton)" <rwilton@cisco.com>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] yang-instance-file include-defaults leaf
Thread-Index: AQHXdB0ScDY6rhEwiUCIGrL2qSijE6s6kiOAgAHaXQCAGqYDAIAAFuiAgAHkeYA=
Date: Wed, 28 Jul 2021 21:56:41 +0000
Message-ID: <AM8PR07MB8230B99ECE7545FC7133363BF0EA9@AM8PR07MB8230.eurprd07.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: yes
X-MS-TNEF-Correlator:
authentication-results: yumaworks.com; dkim=none (message not signed) header.d=none; yumaworks.com; dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d7b0bbfa-47e5-4d21-41b7-08d952129582
x-ms-traffictypediagnostic: AM8PR07MB8171:
x-microsoft-antispam-prvs: <AM8PR07MB81719DA62837C538A24F8098F0EA9@AM8PR07MB8171.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:1775;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Pxn2rUsXkGJbadbmNng14HQLsOpWTqzSUa13wWfqfBq0absI+ZDYoqcK5PiMWCgrz2ZY2qMErlMfH7SYM1rItg/N2lGqoKm0qYcrfyItFJQwXvln8Z5h/t7Zb5AODzFj1bJAxHWxaWPsGfZWXgw2N76fPmvhZ3cd8kodgirutnvR6/Jozh8gEzhSdvDQPYG0f0IYviPnIyqbS1XjttcGFD+931lLQx+m+WZaeeoBQ1oQM57EF1wS0yOR9WAEHQ93BiSaIRYR1eFHE/BcRNwBVtVChwX0EidmdGcTmPWWmJ6Dudz/Rk/M42gjWUlFTKl7y0Cupo3eszeMb06cZDgZywzqeXZO4/ENtqFeXQqgiGkTx3A22ST/PQtwEHht/FWNrgOf+By2snep69/JJs2vhlcO6ZdIePCvThfsenW6AElsRFGgMvY/JPV3pvRp93yynRtmh7PEdYwOb733QhrTio4cq2fUNfSh0xkj2QAP3MjlhVOWoITZb9mn6KyuoQOOVx2AL/k2B2qtcOztNzCMHjrUpMc+vyauelKfgwSWD1WqS9BM/4NMJoqPZ7ISGGXpbzYyH0Da0LHUZGOX8UQRu0Y7MyZ0ygPPu8p7gEDdqf9TagM1UCP8RrRN00floYd587lFW5pxwk7wi3ATdZUoemFiSax5DU/uPetgN3NbPRySIs6GKnXuy7sGHJ5d7mIf6wSYqQTz7QPHzIALv8kuxg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB8230.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8936002)(6506007)(53546011)(186003)(66556008)(66616009)(66946007)(66476007)(85182001)(26005)(66446008)(64756008)(316002)(110136005)(9326002)(99936003)(4326008)(71200400001)(8676002)(76116006)(508600001)(7696005)(122000001)(2906002)(9686003)(66574015)(33656002)(5660300002)(55016002)(83380400001)(86362001)(38100700002)(85202003)(38070700005)(52536014); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: AEEpNMoPuvY2an9DpPZzoIli/RQB7RMQUbAWH2OcNY1ZpIbkdxngyTMirD3C4uxo4/k/dQou+I9Lzl+e9v57JT+UU/vVuGqeG0mlg/y3kAs+Ox7oKCvypa+zzb198TwB8IC/sAr9F+Q/dKBJq7urhTWBrdVVM2Y+YRtpfzclf6lYosZy39lVlC2qeMwAl/l1CYU42sxkvsKRYiNu+PIurnUGsLOWkLA725SL7KlGBxwzZ2VO5D8SkeQSLGyV8cFZUiOTXclSDl1xXbkOlAnBOxvc3KQIlsd3uDDSzQTqT8iDx/Uudo6sQXWzhGmVxlXahxvAcf4TPdCjDxSdf1HxF4+9KYOnBbxK1aoC/pUWo+jmyaOWixrjfYu8QsD+XC7GFdz9NibbPpFVlxW4OA+aONZPUMKFHrw3RsXZPFAV0Kl0wi2PSJSSOPo9yDaI0zoAZ5ZfCYKBrWpmg2jLy9eW3PGBq5rVIYFUORJaCqTojnB1qV69iZQZGZdxS19zxl85Y+jE7Zuq8XSjrxWkFuJcL9VNH6LyV2HSehBJCh3VSE1rmIW3tDdxGnYL9PjO5PPn5x8t2JRFX711aMXLLpy5SCexsElmOF6SFUg888Prtg1AR1h9xxhyGPR+XAI2+/PUv50qXLFVPn78Fj62M2RgILM3WS4Yb8CO3nTFVjxXf+LGJcumf+C6nY87SFM3nK8M6SLkeoQYWHl4tl5OwTFL3aQgK9lLxLCjKO6RsXsIVjdRdsdsNvJAMW5ihL8D+hgz0weiHxCDkMaFXfcQ/bsBgk8K8S4ZeKlDvF1wQbni2FMcgpqzO2Y1BOJeBy1lOxJ6fVWpBYjtpbr/TM03YsEwTlR77SKFJbVRU5IjDKyfbMbO6hTHuI/umnmOd/BZxDLpxopjhzVdn8xC8mMb5v7q35Olh8eaGXTHcmkruS5S6EhcvLN1CC11QqQs38UuVVaYAQir+D+gXcPg40gn3Mwb3jTJFhq1H19sdmaZ+CFmatVjmTLqtz8aiBP6dJTRjnuS7zRJB9+aQekWXWXecCzWwdiDGoIUeocnM0069fLYG7Qy68dzKXpMXB7mFHaCuE1ct4b1QQCNVmH6ekx/oWaV4QY84X+tTrH0WzpPuA1lmsimpB5FvsRj2VQvy57NCqm6IWp9q10VhduvV5d/hCpg36CO2Tb/rwi3VR15Xgm34gAp5WmzFPrzNexQoue/m+FoLFH/jkjuapB9NDzxyKou0yK486sg6Cz6LF6S8Q8s/wk6uLvAiHxCWgJ6IF7w/RRUK2c9lqN3w93H3fTcScgrbpJl4CbY24iN8bSoNU1hcM8Qful9QQazC5ZtzSmO4bM0
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0008_01D7840C.3577DA00"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB8230.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d7b0bbfa-47e5-4d21-41b7-08d952129582
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2021 21:56:41.9602 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: M6fnazdAUzOgJLYByuABjsD+oHv6f5eiIqsuFpG+1+eTpurSvCagHXe11vzfgCG9UYoHLT5zzbCDX7bZiL/YAIMPadsi6kqTHsfnmNX/P6E=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8171
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/acvzAvCBOSF_66kawGHzsSF8oP8>
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: Wed, 28 Jul 2021 21:56:52 -0000

Hello Andy,

I will remove the “default trim; “

Balazs

 

From: Andy Bierman <andy@yumaworks.com> 
Sent: 2021. július 27., kedd 19: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