Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Mon, 19 November 2018 20:47 UTC

Return-Path: <jason.sterne@nokia.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 A3120130934 for <netmod@ietfa.amsl.com>; Mon, 19 Nov 2018 12:47:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.371
X-Spam-Level:
X-Spam-Status: No, score=-2.371 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 wSuX6ElbMV8o for <netmod@ietfa.amsl.com>; Mon, 19 Nov 2018 12:47:43 -0800 (PST)
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40096.outbound.protection.outlook.com [40.107.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5D680128D0C for <netmod@ietf.org>; Mon, 19 Nov 2018 12:47:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uAjBLVfmO6xIqyIxA6l/0NNyEjpvpXkgmMIRrQiJWF8=; b=T4dGLbeNg8Fwu3GUB26d9WXHxXGFNUd0pO92lG87EwEuD/c7Cj02JFxEwlw4wfFH6F4ncSnx3v/xVrWTMeePm80cgmy866dEthjRUNgMd4MvY66BrksmGnMZ6gJ50imWWMcjNIZR1nShPV+lrBZbqS8819M3VV4AbUF//G+neoY=
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com (52.134.28.141) by VI1PR07MB3853.eurprd07.prod.outlook.com (52.134.26.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.9; Mon, 19 Nov 2018 20:47:40 +0000
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::2858:36b3:3cd7:5f09]) by VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::2858:36b3:3cd7:5f09%2]) with mapi id 15.20.1361.013; Mon, 19 Nov 2018 20:47:40 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?
Thread-Index: AdSARc1DsD04ldMzQTGmSlWVLz4VPQAAyDAAAAAFtPA=
Date: Mon, 19 Nov 2018 20:47:40 +0000
Message-ID: <VI1PR07MB39812972691E88C47E1178979BD80@VI1PR07MB3981.eurprd07.prod.outlook.com>
References: <VI1PR07MB3981A171F18213B030D289A79BD80@VI1PR07MB3981.eurprd07.prod.outlook.com> <20181119.214622.418972213170057209.mbj@tail-f.com>
In-Reply-To: <20181119.214622.418972213170057209.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jason.sterne@nokia.com;
x-originating-ip: [135.245.20.4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB3853; 6:UAmZCp4WU9ISvkCBmixhFmr0OqkpOSVn+BxxmVvumljtHljf+e02P52RWoUQfOXjyZyHeSs+559zsloZvC9kG+ulIwQFUcX9NzUnQB8cSyByowWgljWc60uBPb8Y8lgeZgRYB7qsC0U+KdQagaMDNCRaLUpaviMdUrL80sX9HKSDsJA+9/cg7lficyEGPUHgylA3P6cGCEiw9evsbt8+W9iNxf48oiiN/y/GloHVNR9E41VQcoCojST/HoumZNDGB2xpGGYHuM2yjfH4h60YeK2t/hCJ6LI2Mu1boPegvzsZFtAFl5Bp49rHBS8rUUfwNyCwwvpc8dFND11FBnkoC7OPjMZSGgW3ED/mCrSfKxMaZSf7lNxq2cPqjra63EeqDUmd6DiKaTnpTMul8c3FdQEeb1rKqdVImdGSGO1AhKjHnqJws//W3F1gHKyherBy/jjm9g7Gg/n2ZKv1Agyv/Q==; 5:yhLMoUj43oJXPef6h31GuzMl+bdZPU1YaulIdRiOVBjgQiCDaeR9EQ2oMV5/yrJ9TnnOsYIY8G4hmZO9xPHOP9ulkAtZejHCY7ba9HCSKPFQ5+qLbovInQuSfUOYiTxWKeUAYcH6AkLCmG7m/j7APt6cnEoWZTP8wpFWJZk98nU=; 7:/Wqh6OXXsuWdLI4N8y4mqO27f4SkMEKnFdIjfazuarRvQkjfdTYsmZkl2OQRfRoIjE/YRZvsZ+p/+hvAGuP6ib8QBXXvBBmMRPXj/kEXSM2AvpdKb0S6c7FVm86WjVn2w8QOiFSKtFZ0eFE9CuK79w==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 1f163ffd-6631-4f04-0f63-08d64e603f86
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:VI1PR07MB3853;
x-ms-traffictypediagnostic: VI1PR07MB3853:
x-microsoft-antispam-prvs: <VI1PR07MB385373967D389B6F6EAB14659BD80@VI1PR07MB3853.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231415)(11241501184)(806099)(944501410)(52105112)(93006095)(93001095)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:VI1PR07MB3853; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB3853;
x-forefront-prvs: 08617F610C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(346002)(39860400002)(366004)(376002)(13464003)(189003)(199004)(53754006)(25786009)(14454004)(97736004)(8936002)(68736007)(33656002)(105586002)(476003)(316002)(2906002)(53936002)(256004)(4326008)(478600001)(6246003)(6116002)(3846002)(5660300001)(74316002)(86362001)(2900100001)(55016002)(9686003)(6916009)(81156014)(7696005)(81166006)(6436002)(99286004)(229853002)(66066001)(8676002)(106356001)(71190400001)(71200400001)(11346002)(446003)(6506007)(102836004)(53546011)(26005)(186003)(486006)(7736002)(76176011)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB3853; H:VI1PR07MB3981.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: gWQWYfKYJywMy2BdtchN/BHkyr6N6vHngUHwsAqEfpNLQY46ARCaWxcBXW8uSK12/Ih/kT8cUqcByAwLWvNfBcHCg6o0vP2MgBnd/mceZMJrRbTaVf58YYr5vH4UVxKy+U4o361h3TMSN1UDEGelsgXAfhgdDr4iMztUO/CWhLHvL8KUb23wTkRsGCiRV4B6/eFsKKB832UjkFRyoDZIWolSv0H2Li7kA9UuukkseJRnwylntZjBTlO9v9btxV2K5vng6luX/2gjun0ThMMQAw4lO+yVzIg6ZuO2o7xV5zHWNigyoyUhTOaFmvPUOWcRdtnJUY7lSCm7JkDWYA5ov7JWtHuMLrD9loZ0cglgxSc=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1f163ffd-6631-4f04-0f63-08d64e603f86
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2018 20:47:40.7820 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB3853
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pD6B2ikMpPU71mSgKBFTPea13Aw>
Subject: Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?
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: Mon, 19 Nov 2018 20:47:46 -0000

Thanks. I forgot that the choice is in the *schema* path (was thinking about the instance data path which doesn't include the choice or case statements).

> -----Original Message-----
> From: Martin Bjorklund <mbj@tail-f.com>
> Sent: Monday, November 19, 2018 3:46 PM
> To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
> Cc: netmod@ietf.org
> Subject: Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC
> change?
> 
> Hi,
> 
> "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> wrote:
> > Hi all,
> >
> > If we have a YANG model with a leaf:
> >
> > MODEL VERSION 1:
> > container my-model {
> >     leaf a { type string; }
> > }
> >
> > And then later we produce another version of the model where that leaf
> > is placed into a choice construct:
> >
> > MODEL VERSION 2:
> > container my-model {
> >     choice some-choice {
> >         case x {
> >             leaf a { type string; }
> >         }
> >     }
> > }
> >
> > Is that considered a non-backwards-compatible change?
> 
> Not accordning to current RFC 7950 rules, since it changes the schema
> node path (suppose the leaf was a container, and someone had augment
> /my-model/a).
> 
> > Does the answer depend on whether the choice contains other cases (or
> > other cases that are the default case)?
> 
> No.
> 
> > MODEL VERSION 3:
> > container my-model {
> >     choice some-choice {
> >         case x {
> >             leaf a { type string; }
> >         }
> >         case y {
> >             leaf b { type string; }
> >         }
> >     }
> > }
> >
> > A client 'foo' using VERSION 1 would still be able to set & read back
> > leaf a in the same way as it always did.
> >
> > But if another client 'bar' (using VERSION 3) sets leaf 'b', then leaf
> > 'a' would disappear. That could be surprising to client 'foo' although
> > perhaps no more surprising than if another client simply deletes leaf
> > 'a' (using VERSION 1).
> 
> 
> 
> /martin