[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:32 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 878BD130934 for <netmod@ietfa.amsl.com>; Mon, 19 Nov 2018 12:32:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.37
X-Spam-Level:
X-Spam-Status: No, score=-2.37 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, 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 SINI6ZDRyiuf for <netmod@ietfa.amsl.com>; Mon, 19 Nov 2018 12:32:01 -0800 (PST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150123.outbound.protection.outlook.com [40.107.15.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F1E28130DE3 for <netmod@ietf.org>; Mon, 19 Nov 2018 12:31:57 -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=YlT5FR65PiPE+gPtcTPlSvXImIWLThMLu75rlef4tNg=; b=lYwJR2p4jHxPuP7PPUVZYvdgajy9WR/KypGX5x8DsHCEwsPmV5G/Qvs6r0CFhL/rgzf4eCtaTnyrh+QjG+n2H1utmUu9B40Yav/7/COCZ2hGCiN55eEI08wF36uC71wGZCQLbHX/v55LXp6Lu0zIkNXltl8Q7kspkR8jBdRffZ8=
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com (52.134.28.141) by VI1PR07MB6016.eurprd07.prod.outlook.com (20.178.123.211) 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:31:55 +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:31:55 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Adding a pre-existing leaf into a new 'choice' - NBC change?
Thread-Index: AdSARc1DsD04ldMzQTGmSlWVLz4VPQ==
Date: Mon, 19 Nov 2018 20:31:55 +0000
Message-ID: <VI1PR07MB3981A171F18213B030D289A79BD80@VI1PR07MB3981.eurprd07.prod.outlook.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; VI1PR07MB6016; 6:7bfKJY33GrAukXIJdBqeRq1Lm/My23/gUq0RLEmyM/7f5ea3akLEPQxUIv6k45AbZ9UrOmVrMQknsJFExRCHDxvJH/MYzOpocUt9JqzYs+Csr4q6033DrMJ4GihTFzLO4/T8Ad0AoJzpKupVnCTvzYvXA8ABCVQ64wMWu28QVNWts5H7GPH6nZYzKR+MYR11RCXX3vP4mTLMC4HQCxcUw/q7QY39iXghXg98JZdqcy8LqMpYwJpEP7P83EWcfILEZYwpXMGlgcjI0Fhg2hgmLeWUpoenbeGV9cdbcS9VDOn+ViGO3SEzErAK7WvcI3D2P4+p0tjuaUHO1dHq9gWD0WKdLDfnphnj1ZcmOY6YMI9JpJIX3BCHvc1QmiiU3qAgmKREv73USD0sZeYBu8CeWDzCAfgtZLEVkBc3j8YW0ulTZ9NkD0xD/TbG+uOPSzc0w3jb9uwmkHHeheZTyH2p3g==; 5:0Zfn1u8DqirHS/A8jTlhOjnLddhrYnWuNoqtIAihBuUgu+aLpLIARthXkl8Erg4JdGgxfuUnybUqODyC/T2yEt8wI+x1lure8ZxoBfTVdN2Qcfow619tmDjhHZiEHDTgnozGKuwbGuOx5aZNDhNsWYDFkLZ4+MxIoGkUQCfxOO8=; 7:00/yLRtqkAmev61KIqUq/lb4ZLojMHXktcz/tJj1B7UeTZi2bYllqwFGxCQQX2RG8Xvulj8HHlT7hv+AbPWg6U1k8gFzT53GgRIB85U5LJgPo0ea7adpdOXd8wAxnRZqxuqKzhoqXs+Ew4S9VBWFgQ==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: c9d1b80f-c9c8-49b6-8e9a-08d64e5e0c20
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR07MB6016;
x-ms-traffictypediagnostic: VI1PR07MB6016:
x-microsoft-antispam-prvs: <VI1PR07MB60162F037E368E306571E0919BD80@VI1PR07MB6016.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)(3231415)(11241501184)(806099)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:VI1PR07MB6016; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB6016;
x-forefront-prvs: 08617F610C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(39860400002)(366004)(376002)(396003)(189003)(199004)(53754006)(71200400001)(71190400001)(478600001)(316002)(102836004)(14454004)(2906002)(5640700003)(2501003)(97736004)(26005)(256004)(25786009)(33656002)(53936002)(9686003)(105586002)(54896002)(6306002)(55016002)(68736007)(106356001)(8676002)(3846002)(6116002)(790700001)(186003)(2900100001)(74316002)(2351001)(6916009)(6436002)(486006)(7736002)(7696005)(66066001)(6506007)(99286004)(476003)(86362001)(1730700003)(81156014)(5660300001)(81166006)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB6016; 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: omdKHzGgpFBBkcinRa5hRgvJfnemHx0LWdGNm4SpGT16QI8+POnfiFbInGDyeexHOwdN8mtWZ1HezrqxOToCaKFiUbkB4EIGa7nVjYXU6THhc3jDCt0WgdO/uxLms+4wlM5dxMX7T/494m2MR8WP0HXmE1WH0IapfVzzbmUADQ26QSEnlbm6RPSqBwk1J+o/yqjDImppQ9junMD8UoGMpZF9qi2rIm339lU9P071xPmkYJW10v60B524R5qsorTJQK3OtCVdWrs1TOrh6Ac4BpTs8XbjalSxxwLMwohSu29HGycesKg82XJAVfbEUqGKUF9mwTjEnZW2/YaXfauJDGPgpe9n9oUgwWJ5hk0YrIU=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_VI1PR07MB3981A171F18213B030D289A79BD80VI1PR07MB3981eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c9d1b80f-c9c8-49b6-8e9a-08d64e5e0c20
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2018 20:31:55.6065 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6016
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/IUvds3qo7T6XL95TAuq1CTa-iCM>
Subject: [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:32:04 -0000

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?

Does the answer depend on whether the choice contains other cases (or other cases that are the default case)?

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