Re: [netmod] [SUSPECTED SPAM] Re: type equivalence

"Rob Wilton (rwilton)" <rwilton@cisco.com> Fri, 26 February 2021 16:58 UTC

Return-Path: <rwilton@cisco.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 CEFE83A135A for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 08:58:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.6
X-Spam-Level:
X-Spam-Status: No, score=-9.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=lAB4aVeG; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=aanXM5To
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 wxGXbHxvnaMO for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 08:58:40 -0800 (PST)
Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AE04B3A12E5 for <netmod@ietf.org>; Fri, 26 Feb 2021 08:58:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=41276; q=dns/txt; s=iport; t=1614358718; x=1615568318; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=iVVb1wcsOzzGjS3sXCZIlUXErEQ8klMxhySDB29lg84=; b=lAB4aVeGz0nbiUcBS7ookHqUq9rIeLW170ZZ+xyHaXmri2XdYcHEEmzA sQ8c2ZNY/uQUYnwl1h/aVcErr6Dj1jEO4AapD2eeUxYEfS45cACz16XAc X6sSSORnACKqCEM8y9VRMlvk3M5ISKD/yBwfU+HdoOSmJQQwCkv4pJkG0 w=;
X-IPAS-Result: A0DpCQBvKDlgmIcNJK1fAx4BAQsSDIIEC4EjMCkofVo2MQoBhDaDSAOFOYhVA4MZlgiBLoElA1QLAQEBDQEBHQEKCgIEAQGECUQCF4FjAiU2Bw4CAwEBAQMCAwEBAQEFAQEBAgEGBBQBAQEBAQEBAYY2DYZEAQEBAQIBAQEhChMBASwLAQsCAgIBBgIQAQQBAQEgBwMCAgIZDAsUCQgCBAENBQiCHUsBgX5XAw4hAQMLlQKQagKKJXaBMoMEAQEGhR8YghIJBYEzgnaEBgEBhkUmHIFFQoERQ4FZfj6CXQEBAoFGGhUKDAkICYJPNIIrgWlbBnwTKwFbPYEABpB6gzOHR4xTkDmBFAqCfIk/kwODN4E1jxWPVZRVggmJNIJtjyKEUQICAgIEBQIOAQEGgVsDLoFZcBU7ggFoCUcXAg2OHxmDVjOEYYVFcwI2AgYBCQEBAwl8iggBMV0BAQ
IronPort-PHdr: 9a23:hgUDixWdQyT56QKyD7g+0ZR2k2TV8LGuZFwc94YnhrRSc6+q45XlOgnF6O5wiEPSBN+BueNZjuPJtLrjQioL5pPS+HwBcZkZURgDhI1WmgE7G8eKBAX9K+KidC01GslOFToHt3G2OERYAoDyMlvVpHDh/CMXEwr4LwluYO/yH92ag8G+zevn/ZrVbk1Bjya8ZrUnKhKwoE3Ru8AajJEkJLw2z07Co2BDfKJdwmY7KA==
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.81,209,1610409600"; d="scan'208,217";a="653769462"
Received: from alln-core-2.cisco.com ([173.36.13.135]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 26 Feb 2021 16:58:20 +0000
Received: from mail.cisco.com (xbe-rcd-003.cisco.com [173.37.102.18]) by alln-core-2.cisco.com (8.15.2/8.15.2) with ESMTPS id 11QGwK8v016954 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Fri, 26 Feb 2021 16:58:20 GMT
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by xbe-rcd-003.cisco.com (173.37.102.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Fri, 26 Feb 2021 10:58:19 -0600
Received: from xfe-rcd-003.cisco.com (173.37.227.251) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 26 Feb 2021 11:58:18 -0500
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (72.163.14.9) by xfe-rcd-003.cisco.com (173.37.227.251) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3 via Frontend Transport; Fri, 26 Feb 2021 10:58:18 -0600
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kgWPKTbg2nrD+qzpt2bKkjoqjoi/WoibpupIwrpTO5WJBWAncmxNYRIbXxx5Y5OnujlpPBJAurkTHJGJ5tmEoAuE+59Ix1ywVSbUYAe2tYq72aK3FzXO2R89dMj0kxorS4UN8l70AbNLJ0N53QjegIcIKQeHqPtjbfNWtU4Oe0f7akN1FUftVYOGg1eteyx2R8wu5pIdjPra5BwUpKqa6S6iZM5r9eEaaCySiYUWeqL6ihrxPwqEUdeIem3CFnDANCZzt3O5FyySWEJB213kRGx+MqH3mFrFUKHczCRNkrd2DXUjbFB1oakvuY6XtJ+DvREmASDmOLOPhhKVA5J4bQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iVVb1wcsOzzGjS3sXCZIlUXErEQ8klMxhySDB29lg84=; b=KZvWX6+Zan/L1yW+yE4EVej7bEpS9+KROsrSMZ/RbxaJnLAkAhPhyfCqG75inCLIRGQ92oUrcT7jlxWavIQQmsjnCXyh9kcvxOXPevTZXEWj2zZSyo+/gLH0pr2+q+SWtMBEcBlctcQrr43nKaafG390OmZBGkzb4JvOnO4d/tFk161qhCLBAiXt5NJnB4RIGTef4aftKrBMfWEj0rBYkP67aqW9CzSz/iK9oEUSo4az6BzVwalQUm+S4KpZY94KStrjVAVkNOvWqIvUeWTNVU3qgmj7ePBrJdWu82YaLoDC26rcqn3iEZsbfKCjhA4F7p6zhvXXTYAcHxmeQ1hbkA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iVVb1wcsOzzGjS3sXCZIlUXErEQ8klMxhySDB29lg84=; b=aanXM5TocrMgltAD7w/yFSUeGbSQbIxt6WYEf5umEPLXg3Hu80FJm1th+BZ+NPnxlzUHA/X1QQEHi3lzdw7u0+f3d95CK0qQKUEQlw2+1zdDBD1wxDYmynV5TH0dBs0ES36nBeqcU8WP+BwS/uCmfW1bk1F0Eror/b2pjGWhJeI=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (2603:10b6:208:190::17) by BL0PR11MB2962.namprd11.prod.outlook.com (2603:10b6:208:78::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Fri, 26 Feb 2021 16:57:03 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::24c4:4c09:f6f0:5510]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::24c4:4c09:f6f0:5510%2]) with mapi id 15.20.3868.033; Fri, 26 Feb 2021 16:57:03 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Andy Bierman <andy@yumaworks.com>, Martin Björklund <mbj+ietf@4668.se>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [SUSPECTED SPAM] Re: [netmod] type equivalence
Thread-Index: AQHXDFy4UeJFz4iWp0CmSIZf3pshw6pqoOTwgAABfgCAAAI9gIAAAs2g
Date: Fri, 26 Feb 2021 16:57:03 +0000
Message-ID: <MN2PR11MB4366260DFBBAAC9538E24CDDB59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <CABCOCHSeMpgjmws0X5HStsbjvr8h=8tP3-qwAdjYfqcX3=-P5g@mail.gmail.com> <20210226.173010.2304782771110060094.id@4668.se> <MN2PR11MB43668FAFF23A1DBCB643C21CB59D9@MN2PR11MB4366.namprd11.prod.outlook.com> <20210226.173638.580648753389514487.id@4668.se> <CABCOCHT3jDOqMAc0d4K0QC5kqzE=Fogsb=zVu=AD8-_Tj6QrfA@mail.gmail.com>
In-Reply-To: <CABCOCHT3jDOqMAc0d4K0QC5kqzE=Fogsb=zVu=AD8-_Tj6QrfA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: yumaworks.com; dkim=none (message not signed) header.d=none;yumaworks.com; dmarc=none action=none header.from=cisco.com;
x-originating-ip: [82.12.233.180]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: dc7340e6-dc78-4409-d503-08d8da778ad3
x-ms-traffictypediagnostic: BL0PR11MB2962:
x-microsoft-antispam-prvs: <BL0PR11MB29623858E162E5BBF595BCF0B59D9@BL0PR11MB2962.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Cxeo/EIsb0uFH4j8aiV4E2X/Eyyp2JG/hL4v1o4Hzhl7NTK56ke8/KcHqOI39nobhqfbTdBlmBnJwZ3ChDulDb+jt3ip5OtgNgYwE4Z7Eo2VhPqIqz3NKw4FYfu/HhOeS+U3YpmR0iUwoyYD9x2ASGKrUsNOgDETtb7NF8N08+9V0wV+GZR/MdQdREVVMU2ghbnY/LfxeVzEwc3U+Q7Xy9T+tvx5zQk3CZetIyQ7JjsxXNjZo650taEZyeOAHbRPzwOhznHmy+n3dM3Y0M66Ek5A8wrsDK8hVMaDjLvbbWRHt4UEu89G1PCGQEDR7G93uh09p3rhjVf+rXBtMJFNVB4MLJvM0yg4pTGRokHixGY4DYESNPi9B3FDU/thY42d7VNMfWEKcSNVEUpj+tBaSpAKpJV8GaMOjMZ9usgEftnp+DwGG57b46kifAJMYpQtPA0tnx+Adu7IgfdMVsuUx+h0gLB9M2B+BtB+wzsWNCwNA1gjkWBCC7NguWsusdq3CYq3DRk+TB7CFlso4klM+n9Bi5vOtXLH0kUk+FzT8tfKFelREJ6BGfsIN0ziiXRKntQJEXdi+P0CNLct1QqL7qk9/10TKpVm9CiZ4lgba3ktkbg07UAARlGj0g+drrIPDQyuFdJ2xdjlsdiaW/90vQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(366004)(396003)(39860400002)(136003)(346002)(966005)(9686003)(83080400002)(55016002)(7696005)(52536014)(53546011)(5660300002)(6506007)(4326008)(478600001)(76116006)(316002)(110136005)(71200400001)(33656002)(8676002)(166002)(8936002)(66446008)(66556008)(66476007)(186003)(83380400001)(66574015)(66946007)(64756008)(2906002)(86362001)(26005); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: +LsgLKzvqcJWnnKI243O1k3Eqa5qrCVXdxXeuVPtlGp7d6+HDuEQ2++VWv/9QTCsqTBRk8NCpznuZvu+1Z+yS8JvYmyUU4iYEOh0OF1FEaot/XGOaEyM1G3PdE2Wip9O8jRO/FQJcdFwF6OXOaykdyphYZZcDTTy0rM28mLw9AfhRYNslAKQJEBvHIjqnjl9HrXwGVPVSf3ZOZHv/zF0I5jos6UzjrPbOdeMPg24bwL4alpfUnERWIN2LqZ0+MYOb5L7K7tX2yz5pjIeH/jSQX6QOS7NqBXINM1cM/RdA20pXuiF4p9Re3X5eb+K0styUMlDPeqjTmA+4k7YG26v+0SmsSiklH/fTrCj/URq+JHXgtHuzXspvaem8lM4E+U4YStSuo36I7MvdGi8suTgbHCErbmBdqePtSOw/byGIp3CnhThyZQoDCvvAo2pYtui2FnlL00UxDWBEFnZbh5Pdx6pGsrPlFgtFZ8idAW86I9OnUqRwga90Oeak4KRX4K1lvOUZotnFHxbs1K43c00p6yZmPxhNPrJIeKUVL7pROsAGkVqlK2Wo2P9FgNMV1nFhVp5BipAtj5s+ebDcMaATH4U9PEaQB76erFD4kH7bC+aO9nEGU4hzsbip0moAVOVhD4ogQg0yCHMlN85nhJaMvwNOpRA+RVgG7WGGn7zp5G52L350ef0EJ/nSOhu5/bbc4x4DYNrUuxGNcAyNXsymrb3izPe6DdD5ULLHcDod8xlWkKLtjYyB/czW0WbBqhVImCkW8oBMEUWsuc5QD1On2fpxDB+4fxoMpoVeTqsAi3koydHx7guiXYMAnm7zl3XgEGemSxgXiz5fu0ofhcuQW091xa8M3JVcMomyYyYHF2Fr/TAYotQa19o8W7NvENju0TCbfs44zZWJH6BJXhGWVxo+3qDoi7XMbigozSkdJDT8TSlzMgTQ6CT/r/ERI6wuLOPa6jtamVYZpOpC2n3//Ms8kNjZ2eqaAuVsrVA8QBIrBRSr4IyZ/gVyHNTaqyp7auvUMn5WNShkX3yXNjHfkrPTAPbw6UHwwYGmg+vtPuH4YiXiMC/yOFYtr+6IOfir/WR/HgHitGPTje+NdtvWfqcvgme8rSKm3dmJMxv6vT0hTqVE29Jx35NzlmsLO6YobeIut6scgaf17wABScNzqGZeexlku5qMKHWi7MRu+7SfTo8nl5lux5JeD4g7AvDYr1c3yEf4fZGDWB/crMdS6WhPSnyxdOfjTn1VP4mSzH2MeJtlZiI3NIwfkvNwV76aE4opIA69DapYKxKOxtL4FDvAENZe4UsgZ/4H7sA47s3Ksi0elYGAq37gXrVG+9r
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR11MB4366260DFBBAAC9538E24CDDB59D9MN2PR11MB4366namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4366.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: dc7340e6-dc78-4409-d503-08d8da778ad3
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2021 16:57:03.7297 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: V4bbTC7dXQoVU4Fb8Fr4L7gfSDH4XT0fV+T66bEEBEKFhW5m5p460tQFf9HSpP4XsS0Jq0w3ugLt1lCDUVteMg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB2962
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.18, xbe-rcd-003.cisco.com
X-Outbound-Node: alln-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jYmGycKKCjS-9aZAiTUCJP0e6sk>
Subject: Re: [netmod] [SUSPECTED SPAM] Re: type equivalence
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: Fri, 26 Feb 2021 16:58:46 -0000

For a config false leaf, I suspect that would likely break clients, e.g., if their data structures were generated from the YANG.  They would start received values that they are unable to handle.

Regards,
Rob


From: Andy Bierman <andy@yumaworks.com>
Sent: 26 February 2021 16:45
To: Martin Björklund <mbj+ietf@4668.se>
Cc: Rob Wilton (rwilton) <rwilton@cisco.com>; NetMod WG <netmod@ietf.org>
Subject: [SUSPECTED SPAM] Re: [netmod] type equivalence



On Fri, Feb 26, 2021 at 8:36 AM Martin Björklund <mbj+ietf@4668.se<mailto:mbj%2Bietf@4668.se>> wrote:
"Rob Wilton (rwilton)" <rwilton@cisco.com<mailto:rwilton@cisco.com>> wrote:
>
>
> > -----Original Message-----
> > From: Martin Björklund <mbj+ietf@4668.se<mailto:mbj%2Bietf@4668.se>>
> > Sent: 26 February 2021 16:30
> > To: andy@yumaworks.com<mailto:andy@yumaworks.com>
> > Cc: Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>>; netmod@ietf.org<mailto:netmod@ietf.org>
> > Subject: Re: [netmod] type equivalence
> >
> > Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>> wrote:
> > > On Fri, Feb 26, 2021 at 7:06 AM Martin Björklund <mbj+ietf@4668.se<mailto:mbj%2Bietf@4668.se>>
> > wrote:
> > >
> > > > "Rob Wilton \(rwilton\)" <rwilton=40cisco.com@dmarc.ietf.org<mailto:40cisco.com@dmarc.ietf.org>> wrote:
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: netmod <netmod-bounces@ietf.org<mailto:netmod-bounces@ietf.org>> On Behalf Of Juergen
> > > > Schoenwaelder
> > > > > > Sent: 24 February 2021 20:39
> > > > > > To: netmod@ietf.org<mailto:netmod@ietf.org>
> > > > > > Subject: Re: [netmod] type equivalence
> > > > > >
> > > > > > Here is an attempt to come up with better wording. If people agree
> > on
> > > > > > a new wording, I volunteer to submit an errata.
> > > > > >
> > > > > > OLD
> > > > > >
> > > > > >    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.
> > > > > >
> > > > > > NEW
> > > > > >
> > > > > >    o  A "type" statement may be replaced with another "type"
> > statement
> > > > > >       that does not change the semantics of the type or the
> > underlying
> > > > > >       built-in type.  For example, an inline type definition may
> > be
> > > > > >       replaced with a semantically equivalent typedef derived from
> > the
> > > > > >       same built-in type, but an int8 type cannot be replaced by
> > an
> > > > > >       int16, since the underlying built-in type would change.
> > > >
> > >
> > >
> > > I think the NEW text captures the original intent and is OK for an
> > errata.
> >
> > +1
> >
> >
> > > I believe the use-case discussed at the time of writing was simply
> > > replacing an inline
> > > type with the identical type but within a typedef-stmt instead of
> > > inline
> > > within a leaf or leaf-list.
> > >
> > > Perhaps this rule is too strict.
> > > There is a simple way to defeat it:
> > >
> > > Change all
> > >    type foo {  ... }
> > > to
> > >    type union {
> > >       type foo { ... }
> > >     }
> > >
> > > Now you can add new values and semantics without taking away the
> > original
> > > syntax and semantics.
> > >
> > >  type union {
> > >       type foo { ... }
> > >       type bar { ... }   // note new member types added at end of list
> > >     }
> > >
> > > But it is not clear that this would be legal or completely BC. It
> > certainly
> > > could change the encoding in JSON and CBOR.
> >
> > It is not allowed by sec 11 in 7950, since it changes the syntax of
> > the type.
> [RW]
>
> But the proposed errata removes the text about not changing the
> syntax, or are you referring to other text?

The new text says that the built-in type cannot change, which it does
if we add a type to a union.  Hmm, perhaps this isn't clear.


We do not want to see all types defined with union type wrappers from the start,
just in case.


I do not know if this change is legal in YANG 1.1 but it should be considered

  existing:
     type foo {}

  update:
     type union {
        type foo {}
        type bar {}
     }


This specifically implies that all values that used to be accepted are still accepted with
the exact same syntax and semantics as before.  An old client will not know about the type bar syntax
or semantics, which means it could read values of type bar set by the server or new clients.
Not great, but not a disaster either.




/martin


Andy


>
> Rob
>
>
> >
> >
> > /martin
> >
> >
> >
> > >
> > >
> > > Andy
> > >
> > >
> > > > [RW]
> > > > >
> > > > > Would the text be more clear it is just specified what is allowed,
> > e.g.,
> > > > >
> > > > >      o  A "type" statement may be replaced with another "type"
> > statement
> > > > >         that resolves to the same underlying built-in type.  For
> > example,
> > > > >         ...
> > > > >
> > > > >
> > > > > What does "semantics of the type" cover?
> > > >
> > > > Suppose you have:
> > > >
> > > >    typedef "timestamp" {
> > > >      type yang:date-time;
> > > >      description
> > > >        "The time that an event occurred";
> > > >    }
> > > >
> > > > then you can't change it to:
> > > >
> > > >    typedef "timestamp" {
> > > >      type yang:date-time;
> > > >      description
> > > >        "The time that an event was received.";
> > > >    }
> > > >
> > > > The syntax is the same, but the semantics are different.
> > > >
> > > >
> > > > /martin
> > > >
> > > >
> > > >
> > > >
> > > > >
> > > > > If I have this type:
> > > > >
> > > > >   typedef "timestamp" {
> > > > >     type "string";
> > > > >     description
> > > > >       "The time of day that an event occurred, in any format";
> > > > >   }
> > > > >
> > > > > then can I replace it with this definition:
> > > > >
> > > > >   typedef "timestamp" {
> > > > >     type "string";
> > > > >     description
> > > > >       "The time of day, and optionally date, that an event
> > > > >        occurred, in any format";
> > > > >   }
> > > > >
> > > > >
> > > > >
> > > > > Tangentially, it is worth noting the RFC 8342 also writes about
> > syntactic
> > > > > constraints covering types:
> > > > >
> > > > > 5.3.  The Operational State Datastore (<operational>)
> > > > >
> > > > >    Syntactic constraints MUST NOT be violated, including
> > hierarchical
> > > > >    organization, identifiers, and type-based constraints.  If a node
> > in
> > > > >    <operational> does not meet the syntactic constraints, then it
> > > > >    MUST NOT be returned, and some other mechanism should be used to
> > flag
> > > > >    the error.
> > > > >
> > > > > I'm not sure how clear RFC 8342 section 5.3 is about returning
> > values
> > > > > that can be represented by the underlying built-in-type, but are
> > outside
> > > > > the value space defined by a range, length, or pattern statement.
> > > > >
> > > > > My memory during the discussions was that it is allowed to return a
> > value
> > > > > outside arange, length, pattern statement, as long as it is
> > contained
> > > > > in the value space of the built-in-type.  E.g., cannot return 257 in
> > a
> > > > > uint8, but can return 11 even if the type range is 1..10.
> > > > >
> > > > > But, I'm not sure that is what the text actually states.
> > > > >
> > > > > Regards,
> > > > > Rob
> > > > >
> > > > >
> > > > > >
> > > > > > /js
> > > > > >
> > > > > > On Mon, Feb 22, 2021 at 03:20:02PM +0100, Carsten Bormann wrote:
> > > > > > > On 2021-02-22, at 15:17, Juergen Schoenwaelder
> > > > <j.schoenwaelder@jacobs-
<mailto:j.schoenwaelder@jacobs-%0b>> > > > > > university.de<http://university.de>> wrote:
> > > > > > > >
> > > > > > > > I guess considering the built-in types as incompatible is the
> > most
> > > > > > > > robust approach. If we agree that RFC 7950 tried to say this,
> > we
> > > > could
> > > > > > > > file an errata and propose clearer language.
> > > > > > >
> > > > > > > Right.  And we can keep the COMI key-to-URL mapping as is, as
> > this
> > > > > > clarification is necessary for its correct functioning.
> > > > > > >
> > > > > > > Grüße, Carsten
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > > > > > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen |
> > Germany
> > > > > > Fax:   +49 421 200 3103         <https://www.jacobs-
> > university.de/<http://university.de/>>
> > > > > >
> > > > > > _______________________________________________
> > > > > > netmod mailing list
> > > > > > netmod@ietf.org<mailto:netmod@ietf.org>
> > > > > > https://www.ietf.org/mailman/listinfo/netmod
> > > > >
> > > > > _______________________________________________
> > > > > netmod mailing list
> > > > > netmod@ietf.org<mailto:netmod@ietf.org>
> > > > > https://www.ietf.org/mailman/listinfo/netmod
> > > >
> > > > _______________________________________________
> > > > netmod mailing list
> > > > netmod@ietf.org<mailto:netmod@ietf.org>
> > > > https://www.ietf.org/mailman/listinfo/netmod
> > > >