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

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Fri, 10 August 2018 15:19 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 3C821130E68 for <netmod@ietfa.amsl.com>; Fri, 10 Aug 2018 08:19:46 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] 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 MD-hMIj5_hlh for <netmod@ietfa.amsl.com>; Fri, 10 Aug 2018 08:19:43 -0700 (PDT)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0116.outbound.protection.outlook.com [104.47.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 4D20212785F for <netmod@ietf.org>; Fri, 10 Aug 2018 08:19:43 -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=CAkgFy9mwQf2ijZ6CbGJBW3pxHfPly5AFWeC612eJdI=; b=krRjuAAYb1T6V2rpsXT+4uMqFHLyfET8bgpwyr6sIVrte3jnRBsdFCxckeeyDMI4llrvHkEYNpax3yn092NsuUQQJtS4HFKqXzSUMNYMeVbaB46LkHHsLZbo4ahdcnj3oL4tGN7IwKEoy69RupLoYHr4leP2Jx1OW7rdRYtVFv4=
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com (52.134.28.141) by VI1PR07MB3486.eurprd07.prod.outlook.com (10.175.244.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.10; Fri, 10 Aug 2018 15:19:40 +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; Fri, 10 Aug 2018 15:19:40 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Module update rules: changing a type to a union
Thread-Index: AdQwu/McZzPv597ySjipjOU6kpIpKg==
Date: Fri, 10 Aug 2018 15:19:40 +0000
Message-ID: <VI1PR07MB39818C462606D318A99672B19B240@VI1PR07MB3981.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [135.245.20.4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB3486; 6:y7zbMhVLgImbupJ1OEI7MYOvKXAfHtW1ZLoTRzst3zE8NTo9stMW4N0zmOJm55RhhbYQJKiZuYCibD8EMVAo67sHPjmhn0i+VVyEncN62R55+RFsEzjwdQkguwvUSqhyfaDnMJvhkj1FLjwl5elgAjzlC5iY5B+04y6czu4TMKxC0M2kRD9lyp5Q4Si6H64BtdJQl6BCkmaVkb0FxtL4UMFx+6lpq5N/krbw1cIuuzA3gErzkxwn6COVS7fgSWgIKdmTkxttLiW17mUEwPQhBPKWH5ocsH3Oo9wVVEHw7LxkKrpY799p9GBAQ5WXYeRbSFMaUUMuWgXlLk3I1mwtQywMhRIxzn7+j3oKYhCuObzJ2ZRb/1+R+o4TCIfNVVIxbcB7SLHrRvcl1pDcthmrHUZ/8eksvDIMYMFRN4+co+YugZS0fDbJMi2JKN50FiQOmp37y2QhVtk6r/hTue1MfQ==; 5:cOEGdCZFtQ9p71JKZIdLcklYE8TlNL36VTaVr/z1SV15XDHUCcg3vATEwVN5ZrA4IFUTK4Q4uCnIWwSP0xZPYC5ekrx/t6QvkvOEfEqfbJ2MPA2tHM4kLR8HfbhpisxCPhuKzaIMeGqz58UyaUY6zJ8dluAudgbkf0t+sQa+YSI=; 7:72Z1DXPzLDLzlAG+k6ZKmVALhZXz82h3XFdkr6QPKXoNajYX3QVnS2LQFRkD9DjoFzZGeq1kKxhuE4BU+eA5bUronfJPeCsWMUqwGH57vFr2i6K7GG6XxbxGb0hr0UcGX3ZP7/2jo4mhSGo/gfJQTIFfD3oc7MVjwRl0otGoN1vmxuDtOtj4kdk8h9cUz4U7PU6o8YI/NEBR+p1B5fPciJ6jj6/Z5DU0LJL8EhCEDG6q6AukEtp2vSf5rqa8elr0
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 1a4e6623-23a7-46e2-6716-08d5fed4b188
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:VI1PR07MB3486;
x-ms-traffictypediagnostic: VI1PR07MB3486:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jason.sterne@nokia.com;
x-microsoft-antispam-prvs: <VI1PR07MB3486CC9E3FD4FB108DC922709B240@VI1PR07MB3486.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(21748063052155);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(11241501184)(806099)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:VI1PR07MB3486; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB3486;
x-forefront-prvs: 07607ED19A
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(136003)(39860400002)(376002)(346002)(53754006)(189003)(199004)(26005)(74316002)(7736002)(106356001)(105586002)(99286004)(5250100002)(33656002)(2501003)(2906002)(8676002)(8936002)(10710500007)(316002)(5660300001)(55016002)(1730700003)(81166006)(81156014)(2351001)(25786009)(476003)(486006)(186003)(9686003)(478600001)(66066001)(14454004)(6436002)(7696005)(15650500001)(3846002)(2420400007)(2900100001)(6916009)(790700001)(256004)(68736007)(5630700001)(86362001)(6506007)(102836004)(14444005)(7110500001)(53936002)(6306002)(54896002)(97736004)(5640700003)(6116002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB3486; 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: Xh+MgoYaC+YTK3lNaPJ3gfqgtvCWAYIo/LhZPJadxJLM1ZEwB0GIfJcZzVap/Wq1fpvl8dFuLt7KcOYbp1mPXXhoRCWk5L+h0BieH9+GIJcJqm0jncTqN7FLyI3xoj1eqQh4mK+xItG7UPN/NS47wzVtnJukvKcsCqeez3IPDwOLXw5sPtqm+NuHPPBoncZEEs6fN6ex71xDvDy4kl5zGTTB3q6yudUTIEuq2NOWpXekGACpwnxH3EmeG+/OdaxM0B8TVW8q6OhX+90CyBD7cb546NiFo5ND1yd3Yeb5ddB8jWtr+BHsh9ltdkrVZrxeWePu5Jjb2L+rZGprppUqXXGACI94rBAb6eTfT6hos1N2vngo1dCkmzYT2aSjFkE8pMQsCCLwwvgI9dOBPrVfNQ==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_VI1PR07MB39818C462606D318A99672B19B240VI1PR07MB3981eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1a4e6623-23a7-46e2-6716-08d5fed4b188
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2018 15:19:40.6630 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB3486
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/PYQVPFojM7LCQxzfBQWpdapY5ic>
Subject: [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: Fri, 10 Aug 2018 15:19:46 -0000

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.


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