Re: [yang-doctors] Consistency for naming lists and leaf-lists
"Rob Wilton (rwilton)" <rwilton@cisco.com> Tue, 03 December 2019 11:48 UTC
Return-Path: <rwilton@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5B6CC1200F4 for <yang-doctors@ietfa.amsl.com>; Tue, 3 Dec 2019 03:48:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-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=IFmBLXCA; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=e/A2KRG0
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 47sLF0xmTPam for <yang-doctors@ietfa.amsl.com>; Tue, 3 Dec 2019 03:48:54 -0800 (PST)
Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 09BAB1200CC for <yang-doctors@ietf.org>; Tue, 3 Dec 2019 03:48:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3439; q=dns/txt; s=iport; t=1575373734; x=1576583334; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=71M+9aKdCyok8BMQEYkq+asPI3SXWfQlQ3hNVA+DQj4=; b=IFmBLXCAvX76k8bF+VexRBw4IURrxeT31ZxshCyXUJNnUCY6aULxYZGc BJpcEfuuGZ3pYM2QVyqFl3mZdkRnLegAEThKE1AmDFyZbhH9P1TLzjqd0 KgnjwaiJHgfJdedK4fjduWV/uV+bMgYoDs/M3nmp+sRfOEun+66FDKSJx c=;
IronPort-PHdr: 9a23:H1IDbBwCnwpg9lPXCy+N+z0EezQntrPoPwUc9psgjfdUf7+++4j5YhSN/u1j2VnOW4iTq+lJjebbqejBYSQB+t7A1RJKa5lQT1kAgMQSkRYnBZufFkz/MPnsRyc7B89FElRi+iLzPA==
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0A7AAAJS+Zd/5FdJa1mGgEBAQEBAQEBAQMBAQEBEQEBAQICAQEBAYFsAwEBAQELAYFKUAVsWCAECyoKh2cDinZOghGYBIEugSQDVAkBAQEMAQEYCwoCAQGEQAKCDSQ2Bw4CAw0BAQQBAQECAQUEbYU3DIVSAQEBAQIBAQEQKAYBASwMCwQCAQgRBAEBAR4QJwsdCAEBBAESCBqDAYJGAw4gAQIMpVICgTiIYIIngn4BAQWFBxiCFwMGgTYBjBUagUE/gRFHgh4uPoJkAQGBZYNAggoijQ6JAJg4CoIulXSCQZdijkqBQphXAgQCBAUCDgEBBYFZCiiBWHAVO4JsUBEUjGaDc4UUhT90gSiPFAGBDwEB
X-IronPort-AV: E=Sophos;i="5.69,273,1571702400"; d="scan'208";a="383280173"
Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 03 Dec 2019 11:48:52 +0000
Received: from XCH-ALN-005.cisco.com (xch-aln-005.cisco.com [173.36.7.15]) by rcdn-core-9.cisco.com (8.15.2/8.15.2) with ESMTPS id xB3BmqDi022970 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 3 Dec 2019 11:48:52 GMT
Received: from xhs-rcd-002.cisco.com (173.37.227.247) by XCH-ALN-005.cisco.com (173.36.7.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 3 Dec 2019 05:48:52 -0600
Received: from xhs-aln-003.cisco.com (173.37.135.120) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 3 Dec 2019 05:48:51 -0600
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-003.cisco.com (173.37.135.120) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 3 Dec 2019 05:48:51 -0600
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T1tG31eSsrGvCjmssqZ1xV9be7Or/WZ79egCuI1POPT1UBAnX82baJOILXqVTXX6XtjqjigSBDANZK0dBbHCredgLQSF+ydRnsV/hkstd9+QGC/m6epxOO9v+smxx3SLHiNl5E3vHM2oJziFRuYU78Jw8ogERFIlOoX3TOyMMPv9HwbugOSJtSgAwaQtRuSJrwLKjSiurXt4RdpyVrnGuPAQGCjJoc2qOUoRV2a7R+rIekUJm8Pa2SUb5qpbZCa2FFiaSFbbm8f5wMxVCO6IUeGqz59f6dlCDMyOy8WgoyTjtU5qmtdjvJqIJSrQOe6qXgIRYsUMJgEK9Rc+yRMJgw==
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=jRPWWzZ1tfVxMiDlLsvyR+MBwuzlS4dGnhBP3Eke4nE=; b=IJUPqY/cRGPKbtMNrO4mr95UbYHWn1qaAlydbQo92ZPaXzGGjDBYaSTqwBL1NovcHPpy6UDzNIWun7zv1CRWrrjNA6ccoifl8JFoAQ8AvWSqnO+va/4P+kQV/nSg2VWRF7Vkp7UbV+51JOHPeamQv9TMwanRyYUeZYosPQPPMmqxFWCOIorS19M/UxEzxTmJofWnA/BaIA3mRAm+mNUZfEbJ2TNMrBrJvI2st26qVA2X+pMcAobR/Ua+Dl2ER9oVJdNHzOBi8hm5b6qweBJvdxkmHf7dC5weBvXEAztx7i6QNRoeg6Esa6dIFLTCk7rhQ142aLNJoKfXBsactOV7Qw==
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=jRPWWzZ1tfVxMiDlLsvyR+MBwuzlS4dGnhBP3Eke4nE=; b=e/A2KRG0hxoDYg140Dk+b4XQxqb3GXTZ0+Wa1cqVCdY4m0Fm9oDBRPjEL/VFMxR0z5FjckSAo6LtKMjy7koXkSzqxBJX66DwksSgcrJ4+GY/GeEIdCOaJ0yPsgydJBbXgoFrP/5PHjemg73Ly4Ugc/hfjxrag/duve6YjVsTi+I=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB4398.namprd11.prod.outlook.com (52.135.37.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12; Tue, 3 Dec 2019 11:48:50 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::8106:b538:2920:a44f]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::8106:b538:2920:a44f%5]) with mapi id 15.20.2495.014; Tue, 3 Dec 2019 11:48:50 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Ladislav Lhotka <lhotka@nic.cz>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Thread-Topic: [yang-doctors] Consistency for naming lists and leaf-lists
Thread-Index: AdWmoN+obpgJJ6ZhScC3Y7prdGvzGQCSyRWAAAc6kwAAMUyA0A==
Date: Tue, 03 Dec 2019 11:48:50 +0000
Message-ID: <MN2PR11MB43663CA34FE4E3B9EDB59578B5420@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <MN2PR11MB4366355E6E59D9AFE3F27615B5460@MN2PR11MB4366.namprd11.prod.outlook.com> <20191202.093931.847844329284889456.mbj@tail-f.com> <9e54af2d14f72cfc498fee23987e588e84e59bc5.camel@nic.cz>
In-Reply-To: <9e54af2d14f72cfc498fee23987e588e84e59bc5.camel@nic.cz>
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=rwilton@cisco.com;
x-originating-ip: [173.38.220.46]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 165e9d17-64ce-44ee-a3bc-08d777e6c3d3
x-ms-traffictypediagnostic: MN2PR11MB4398:
x-microsoft-antispam-prvs: <MN2PR11MB43987A62619823B1AD668364B5420@MN2PR11MB4398.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02408926C4
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(199004)(189003)(13464003)(51444003)(8936002)(8676002)(33656002)(81156014)(81166006)(6436002)(6306002)(9686003)(7736002)(55016002)(2501003)(6246003)(74316002)(305945005)(229853002)(256004)(66556008)(14444005)(66476007)(66446008)(64756008)(66946007)(25786009)(76116006)(76176011)(86362001)(53546011)(102836004)(110136005)(26005)(6506007)(316002)(7696005)(186003)(99286004)(478600001)(6116002)(3846002)(14454004)(446003)(11346002)(2906002)(966005)(71190400001)(71200400001)(52536014)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4398; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: +2yYshTVHJ2mc/1xiJAchvdiB9/zK+FsqH1liVIQjUQ2HgjXfjYN5TejFkBt6eiR0hPFERQ1jIOIzP9BpS48EbcE81CNyLSxYqgwk/xY2MxkWA7Rgls9EUEnvvDGPjKxPNZszFgGWyGLRwyXbvxTnCZe9VG8PHW9orAjKvjoUdMyCVPUBrQ/GEPXssSIxrx9tTqARdGuAAP2iVlI41bCKYQcrING83+4HzHyUXu0AUe6HeYK0UQq3D1J0pkFpZ7UI6DOwad5GmSw8CRKRj1T7HjD2CTZKw7T1HAfKq7wsBCOWDSCsy9Zg3hH6nbcmF5qwbFZvpMbo3sFi6dtdW6HgZMjBEErz+DJndwiWOK364M8IUly8Ef7+whdjarAmLHcnRJ6UjRU9K2j5tfQlk27m57sZWuVpJcPIaDn53fVnoUO6wjsrHu2fSNWpOx3K7EF614a0FhgTlvMYqfknvfShLJgYtfJiqkamVQFFximn8Hvsr02T/T2LdkJz91Fywbi6PMkMU0rudz+uGMJr1XfQtflC7q7Hl1TuU8xEx9kjRn2vqOqdTk+Iu+OT1r8FrgK
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 165e9d17-64ce-44ee-a3bc-08d777e6c3d3
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Dec 2019 11:48:50.4447 (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: NExqebvTX2VEMKG4iIs7TOKDD9TtlgR2+GbEnC9h/NJbto74LiKTmL12qSl0saB0driLvuIOB1qOKix6znf20g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.15, xch-aln-005.cisco.com
X-Outbound-Node: rcdn-core-9.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/tTDBbyebqPy4TLJVzdy0ZXTzL0A>
Subject: Re: [yang-doctors] Consistency for naming lists and leaf-lists
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2019 11:48:56 -0000
> -----Original Message----- > From: yang-doctors <yang-doctors-bounces@ietf.org> On Behalf Of Ladislav > Lhotka > Sent: 02 December 2019 12:07 > To: yang-doctors@ietf.org > Subject: Re: [yang-doctors] Consistency for naming lists and leaf-lists > > On Mon, 2019-12-02 at 09:39 +0100, Martin Bjorklund wrote: > > Hi, > > > > "Rob Wilton (rwilton)" <rwilton@cisco.com> wrote: > > > Hi, > > > > > > Perhaps this has been debated to death, or there is already an > > > agreement, but do we have an agreed consistent approach for > > > naming/containing lists in YANG? > > > > > > In particular: > > > > > > 1. Should the list be enclosed in its own container > > > (e.g. interfaces/interface)? > > > > I don't think all lists should be "forced" into either having a > > container or not having a container. Sometimes it makes sense and > > sometimes it is doesn't. Proper structure and naming is an art... > > I agree but it is also worth noting that in XML representation (unlike > JSON and > CBOR) list instances may get interleaved with instances of other data > nodes, if there is no enclosing container. I don't that I'm trying to impose a hard and fast rule, but I would like a default position to strive for more consistency between YANG models. Other than the case that the list would otherwise sit at the top level of a model, where it is better to have a single, or very small number of, root containers to contain all of the module's data nodes, then in what cases does it make sense to specifically add a container only around a list? E.g. I would think that the XML encoding issue is either a generic issue that applies to all lists or none. Why would it only be a consideration for some lists? Can't we just say that lists SHOULD NOT be put in their own containers to wrap the list? Thanks, Rob > > Lada > > > > > One recommendation is to avoid top-level lists, hence "/interfaces". > > > > > 2. Should the name of the list be singular or plural? > > > > Singular! > > > > > 3. Should leaf-lists be treated similarly? > > > > Singluar name, but enclosing leaf-lists in containers are rarely > > useful. > > > > > 4. What if the list is a top level YANG node, does it get put into > a > > > container in that scenario (e.g. network-instances/network- > instance)? > > > > Yes. > > > > > I think that it would be good if we can have a consistent approach > > > during reviews, perhaps folding into a future update of RFC 8407. > > > > > > Looking at a couple of the recent models in RFCs, would seem to > > > suggest: > > > > > > 1. Top-level data nodes should probably always be containers > > > 2. Lists don't need to be enclosed in a container (and should not > be > > > top-level data-nodes). > > > 3. Names of lists and leaf-lists should be singular not plural. > > > > > > Does that align with other folk's opinions? > > > > Yes. > > > > > > /martin > > > > _______________________________________________ > > yang-doctors mailing list > > yang-doctors@ietf.org > > https://www.ietf.org/mailman/listinfo/yang-doctors > -- > Ladislav Lhotka > Head, CZ.NIC Labs > PGP Key ID: 0xB8F92B08A9F76C67 > > _______________________________________________ > yang-doctors mailing list > yang-doctors@ietf.org > https://www.ietf.org/mailman/listinfo/yang-doctors
- [yang-doctors] Consistency for naming lists and l… Rob Wilton (rwilton)
- Re: [yang-doctors] Consistency for naming lists a… Acee Lindem (acee)
- Re: [yang-doctors] Consistency for naming lists a… Martin Bjorklund
- Re: [yang-doctors] Consistency for naming lists a… Martin Bjorklund
- Re: [yang-doctors] Consistency for naming lists a… Ladislav Lhotka
- Re: [yang-doctors] Consistency for naming lists a… Rob Wilton (rwilton)
- Re: [yang-doctors] Consistency for naming lists a… Kent Watsen
- Re: [yang-doctors] Consistency for naming lists a… Martin Bjorklund
- Re: [yang-doctors] Consistency for naming lists a… Andy Bierman
- Re: [yang-doctors] Consistency for naming lists a… Rob Wilton (rwilton)