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

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Thu, 22 November 2018 12:54 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 621E212F1A2 for <netmod@ietfa.amsl.com>; Thu, 22 Nov 2018 04:54:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.359
X-Spam-Level:
X-Spam-Status: No, score=-3.359 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.46, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=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 7QhMawbReD8v for <netmod@ietfa.amsl.com>; Thu, 22 Nov 2018 04:54:30 -0800 (PST)
Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0723.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::723]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA6EF12DDA3 for <netmod@ietf.org>; Thu, 22 Nov 2018 04:54:29 -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=2Sg8KGjCNMj0gkO4jGJJlUwNquvg9mWRfFFkOFNrdIc=; b=ZJKQXUc00w+IR2vVhKQlRLMZu7yTuZWaX/7ojVHx39flpL/vvyZwsm9g0wH/ItbKxDmotU73ZfJc7AIzVHIPmHhTYhmkuXtUxKQoUdxWoamB9Nnei4ZECNCGMntOTDNS0XNo1zJxyJxbXOiTkhifXyKsLXSdXfxFwLMQYhuHvqY=
Received: from DB7PR07MB3978.eurprd07.prod.outlook.com (52.134.100.23) by DB7PR07MB5802.eurprd07.prod.outlook.com (20.178.105.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.8; Thu, 22 Nov 2018 12:54:27 +0000
Received: from DB7PR07MB3978.eurprd07.prod.outlook.com ([fe80::d501:332:48c7:4d6c]) by DB7PR07MB3978.eurprd07.prod.outlook.com ([fe80::d501:332:48c7:4d6c%3]) with mapi id 15.20.1382.007; Thu, 22 Nov 2018 12:54:27 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Andy Bierman <andy@yumaworks.com>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?
Thread-Index: AdSARc1DsD04ldMzQTGmSlWVLz4VPQABCoCAAIXePiA=
Date: Thu, 22 Nov 2018 12:54:27 +0000
Message-ID: <DB7PR07MB3978A22EA0FFF32725E37B639BDB0@DB7PR07MB3978.eurprd07.prod.outlook.com>
References: <VI1PR07MB3981A171F18213B030D289A79BD80@VI1PR07MB3981.eurprd07.prod.outlook.com> <CABCOCHQM9Y_+ENB_sFGDQ6NufGm=mBRU-Ns4xiLXddMWXTUO6w@mail.gmail.com>
In-Reply-To: <CABCOCHQM9Y_+ENB_sFGDQ6NufGm=mBRU-Ns4xiLXddMWXTUO6w@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [45.72.219.254]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB7PR07MB5802; 6:GeJDrKQ2Dk4HXZwwFUYQC/DU8rPy1usWF5vb6sTxb1bjpf0Kh6yaTOPA6WLJ2JFnbIW/428MISTs+mvsjW1fjEc1ui8ktBEVCWCWJJZUzt00RBuj0bQ0eCFY8beYffBIxBN5UlFd8CprJvWJNGkQF0pBbQ9bGHfvN+cl8wDu/z5+iNm8yoTaHQDGHcQCPT+6RaHvo4JGwBSwwDzGNrnuJbCTY6ar8iTdP6Rr7L8hPGvYI3/zM+KfVfeYQhwnfZXzzAxB27qAXe1mLtVKbOoPNFNF8cQozzd8EzKfK5P+T7tKamVhfgP9kAlRZjtGFqp+9maZHVQ+3L3qKDwh2cN6fllfDuH8g6X56NMswKBEFq3WuVrCx8mLSMdp+fRMoEGPaYvGYYMQIpYPY38B/UWqFmg36XwSoxJa695wP+7ZdR1UHbMBLoCzMBPrQloeWOZcAjjtBY7gM4hp9JvtlfSWvA==; 5:+d/lCSq3nk3X5ZDBy1z1KxT1IKzhq2GDoDZ0wvj1JhaB22e2P/hD42F6BIPNhUKb/nXTmxN6GpzDBVCbbMw7PzH1DXIJwB9bJikEdrbccSGVVpQH5g/Ne5EFnACO4qIRpv6POOwL2Eao5mLp5r6YBxv5Bn3zqIJc1ZbQx1Pt1vo=; 7:QqoZkxPpkDRdHZVysUBSX3qhFHDKt70k5PP6otVsL+ozogTmdWjouPZAdKxhw7ZfIyK5ABJno5uSSkJ0XpzytHFlo0+xECcFfK9JAElNLM11WBEnksJNAThMgSZfXxh2l11jvvLW8hbpXrw5gPiCig==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: e8fabacd-f0c8-4a46-bd6f-08d65079a2f5
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:DB7PR07MB5802;
x-ms-traffictypediagnostic: DB7PR07MB5802:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jason.sterne@nokia.com;
x-microsoft-antispam-prvs: <DB7PR07MB5802E1E59328100D1E2B548E9BDB0@DB7PR07MB5802.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231442)(11241501184)(806099)(944501410)(52105112)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DB7PR07MB5802; BCL:0; PCL:0; RULEID:; SRVR:DB7PR07MB5802;
x-forefront-prvs: 0864A36BBF
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(39860400002)(366004)(346002)(396003)(376002)(199004)(53754006)(189003)(478600001)(2906002)(6506007)(53546011)(5660300001)(6246003)(966005)(9686003)(8936002)(3846002)(106356001)(99286004)(53936002)(25786009)(790700001)(6116002)(54896002)(102836004)(7696005)(4326008)(6306002)(76176011)(86362001)(71200400001)(105586002)(55016002)(71190400001)(229853002)(81166006)(81156014)(68736007)(33656002)(26005)(7736002)(14454004)(6436002)(476003)(186003)(8676002)(486006)(97736004)(2900100001)(74316002)(606006)(6916009)(11346002)(446003)(316002)(236005)(66066001)(256004); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR07MB5802; H:DB7PR07MB3978.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: ceHwPOFJWM4dQtXu7gUxAjD06jgZChsWZJ9ktuNWwZ5czQVb8rUMyqARPWXczvqDrTFx+j/3RMuoLZA8pQysvBTWKemgGw9jo58/winkhgwc9D57GwY3ch3SG7Lmf7FiLjg96oT2u1WwdHA8Z/4G7CVeFZfMhgcaA71CnJjqbRoyhSQDb3IEvuD2rmJ2wzZhayJfNVlwY1xtEvX7rFyPXk3BC7xM5AmMdCLZ/q86t92CpnqLf1fRTJlbC19Bcve16EUbNOjCdSyB13/L5IljFwo77E0J9L3OCDhSpeCketnd0+nKIH+N3g1BfQoO7mpppi3QIUrHAqm3/TVK3zZl5wU0Cc20j/F14DF1Wm28t9s=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_DB7PR07MB3978A22EA0FFF32725E37B639BDB0DB7PR07MB3978eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e8fabacd-f0c8-4a46-bd6f-08d65079a2f5
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 12:54:27.4402 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB5802
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5evPkjJ-2aorrt0nw-krx7GluCo>
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: Thu, 22 Nov 2018 12:54:34 -0000

Thanks Andy.

I didn't realize that leafref paths would contain the choice & case names as segments of the path. But now that you pointed that out it clarified what this meant in section 7.9 of RFC7950:
   The identifier is used to identify the choice
   node in the schema tree.  A choice node does not exist in the data
   tree.

Is the same thing true for XPaths in 'must' and 'when' expressions? Would those contain choice & case names when referring to a node? Or do those refer to the *data* tree rather than the *schema* tree?  I'm sure it is in there somewhere but I couldn't quite figure that out from looking around 7950.

Jason

From: Andy Bierman <andy@yumaworks.com>
Sent: Monday, November 19, 2018 3:54 PM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
Cc: NetMod WG <netmod@ietf.org>
Subject: Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?


On Mon, Nov 19, 2018 at 12:32 PM Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com<mailto: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?


yes -- even though the data node /my-model/x did not change,
the schema node /my-model/a changed to /my-model/some-choice/x/a.
Any leafref path pointing at this leaf will break.


Andy


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).

Jason



_______________________________________________
netmod mailing list
netmod@ietf.org<mailto:netmod@ietf.org>
https://www.ietf.org/mailman/listinfo/netmod