Re: [netmod] Module update rules: changing a type to a union

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Mon, 13 August 2018 11:35 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 B13D2130E95 for <netmod@ietfa.amsl.com>; Mon, 13 Aug 2018 04:35:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, 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 y66Prues_u2K for <netmod@ietfa.amsl.com>; Mon, 13 Aug 2018 04:35:08 -0700 (PDT)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00116.outbound.protection.outlook.com [40.107.0.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 92EB7130EDD for <netmod@ietf.org>; Mon, 13 Aug 2018 04:35:06 -0700 (PDT)
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=kJMCjX6sgD+QBQ8FQN9r8cNBt/T1nx42TRw+umo6JBE=; b=S99I6EWNblt0whxd3W/1jU1RUQgHS9cGNynbqXjyxJVVeqwWtmTujD3Vr+p3CoMGuH2F8Bx15BgTpa8XAZ/6zAENWBZVd10WReRCzDlKEcrwG409qUd+65Bk2pAi6x04TqIANUjRni6/3RlhHo5lFQheNIoAPEvi64c84wxGVGQ=
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com (52.134.28.141) by VI1PR07MB4541.eurprd07.prod.outlook.com (20.177.56.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.13; Mon, 13 Aug 2018 11:35:04 +0000
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::dd01:b567:f507:8f07]) by VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::dd01:b567:f507:8f07%4]) with mapi id 15.20.1059.010; Mon, 13 Aug 2018 11:35:04 +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] Module update rules: changing a type to a union
Thread-Index: AdQwu/McZzPv597ySjipjOU6kpIpKgCMZowAAAMA6nA=
Date: Mon, 13 Aug 2018 11:35:04 +0000
Message-ID: <VI1PR07MB39813B8154587F972FC413889B390@VI1PR07MB3981.eurprd07.prod.outlook.com>
References: <VI1PR07MB39818C462606D318A99672B19B240@VI1PR07MB3981.eurprd07.prod.outlook.com> <20180813.120816.949834847603219014.mbj@tail-f.com>
In-Reply-To: <20180813.120816.949834847603219014.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: [24.140.239.90]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB4541; 6:AGn4HSleYFOTKG+RmpS/7HIrnAN+vLW7wnBfz6Sq1jZGrSQf2d0sUNhvJp3RgXhIZdYpmTJPTO5Ns5J5p80oLJ71VpprNsGgZNt1F+PJYvkDdHekGFDp73lDm/4/+deRv8jq9V0mUqQcQVS1FnB5piZUTZL09HnjXieGP62qTNPfj5xE+nJEkAe2QbPll3JKZ+iFvVfRlvGPWAhTAyNXM4U0gAeNGMtvUO3lIwldrE8hrwuJUOtKk1hHWxJwXGqwj6hj5dnQ/hUHdD2XpKvrnvo5HE5yTN5siYKPNuAIeEHLZuCwMKergBmD/blDN74Tzr9n0X2kISt3CkBbg65GSok39/VksqrQjq2hG/uqWcpJuNOrBLZZEuXObUsHmC7oeEa2vU0RdX3wk4O8qRJwEoJWhGwnOyk3hRoix1l9Jx87nDSikItWKe28ra9HVYbME5+0XlyQhIowoJsHVLCFvQ==; 5:v2KW+xTXtEWFadp6/JATza7VoWhOSC5B7QsQPrkkgSxW1aK0e0gmy8fNZizsxa655Y4w9s9B1Dh8DAquwLYJR810Yfyx8TszMQ1rgJDhekDtkWCEP4I5c6u8pNRYWz3zvGEpNyNhQtUZ1JTQOgMBmRW6FfD/+lmA7ihYIH5QTAw=; 7:A2jHTKYwtpyJhuJMOaBMkXjpfGhNeulJykOvVSAldgAaGQsxBssB0ICDkd2/PudKkp2RMPkUAcKqeWevcr2mK3MOwCqFyopyocwQk8QWLqkOM+eDSN5feg1FX7AWvEQ9ph+eOsfpVPkzd21vXMoMtUyF1gZYDTyR6sJaS/q1seVH9gWG28DYwejJrdmeL6ARgD1dsKsK853nXRVL3FROFmBl7/PvNnT9lNBBdiJ7haelJSEOKOsvHjEcP3FrCwyT
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: f0cc9425-8532-4e1f-9aa1-08d60110d015
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:VI1PR07MB4541;
x-ms-traffictypediagnostic: VI1PR07MB4541:
x-microsoft-antispam-prvs: <VI1PR07MB454167047FE7E836BF55AF849B390@VI1PR07MB4541.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(82608151540597)(109105607167333)(195916259791689);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231311)(11241501184)(806099)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR07MB4541; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB4541;
x-forefront-prvs: 07630F72AD
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366004)(396003)(136003)(39860400002)(13464003)(51444003)(189003)(199004)(53754006)(105586002)(66066001)(53546011)(6916009)(14444005)(53936002)(256004)(4326008)(6246003)(97736004)(106356001)(99286004)(186003)(76176011)(478600001)(14454004)(316002)(6506007)(102836004)(86362001)(2900100001)(26005)(446003)(7696005)(11346002)(7736002)(486006)(476003)(74316002)(8936002)(81166006)(81156014)(8676002)(5250100002)(305945005)(25786009)(68736007)(15650500001)(55016002)(3846002)(6116002)(2906002)(5660300001)(6436002)(9686003)(229853002)(33656002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB4541; 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: bqfWF+KNucEfKfEoN6w4Mzl2vIPajFoOyjBx4ZPfpRl+2r2q5nwayxvbh5m2BA6FUfaNhU+1l4TQzqJLi+/2JIcS4xM49zaVfxFmGLNEsS6NxRTFmSr17dGcY5lDxxGI8H6JVt9FOZUzQI4FJMdPcA4TKJCia0SVozinFFwmeF/BIk2H4O58wQGpDLC+GhLITt22AX00Glz3Jb+tGHKyoGcfAJ0+eglasSlL5sZTe80xiIselpEM8drpOd9I1ThJ5MJNFhP3wHSrjdX/fIgWBs5BGTtHSDQrz29syZwzpDDunFxXfVmi4/J4piYUn2yR7ZN9WMXOZFQuh4KrmJJP0sWW+gUpA1fCLAa6kEazbs/gngGC/19slkKUJliTsZwfmvPAgaCWXI75rGeqD/mUfw==
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: f0cc9425-8532-4e1f-9aa1-08d60110d015
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2018 11:35:04.0524 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB4541
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/eJjcn-PuHUJm3YbtvpKqxBTS1TM>
Subject: Re: [netmod] Module update rules: changing a type to a union
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.27
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, 13 Aug 2018 11:35:11 -0000

OK - thx Martin and Alex.  It seems the conclusion is that changing a type to a union is not allowed.

> -----Original Message-----
> From: Martin Bjorklund <mbj@tail-f.com>
> Sent: Monday, August 13, 2018 6:08 AM
> To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
> Cc: netmod@ietf.org
> Subject: Re: [netmod] Module update rules: changing a type to a union
> 
> "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> wrote:
> > Hi all,
> >
> > I'm uncertain about how to interpret the YANG module update rules when
> a type changes to a union.
> >
> > Is the following change allowed?
> >
> > From:
> >   typedef my-type {
> >     type enumeration {
> >       enum "foo";
> >     }
> >   }
> > To:
> >   typedef my-type {
> >     type union {
> >       type enumeration {
> >         enum "foo";
> >       }
> >       type uint32;
> >     }
> >   }
> >
> > The general spirit of the rules is that expanding the value space is generally
> OK, but this case does seem to violate this paragraph of section 11:
> >
> >    o  A "type" statement may be replaced with another "type" statement
> >       that does not change the syntax or semantics of the type.  For
> >       example, an inline type definition may be replaced with a typedef,
> >       but an int8 type cannot be replaced by an int16, since the syntax
> >       would change.
> 
> Right.  I think that changing from an enumeration to a union changes
> the syntax of the type, so this would not be allowed.
> 
> 
> /martin
> 
> 
> >
> >
> > Does the addition of the union change the semantics of the type if that
> union encompasses the original type?
> >
> > With XML encoding I can see how an "old" client could easily still
> communicate with a "new" server for this change. But I wonder about other
> possible encodings that might change when a type becomes a union that
> contains additional types.
> >
> > Regards,
> > Jason