Re: [yang-doctors] Identities vs enums

"Reshad Rahman (rrahman)" <rrahman@cisco.com> Thu, 29 August 2019 16:14 UTC

Return-Path: <rrahman@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 C503D120994 for <yang-doctors@ietfa.amsl.com>; Thu, 29 Aug 2019 09:14:51 -0700 (PDT)
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=SACyuAgn; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=kgmE8fv8
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 YxrmwdGbWjML for <yang-doctors@ietfa.amsl.com>; Thu, 29 Aug 2019 09:14:49 -0700 (PDT)
Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 18F45120043 for <yang-doctors@ietf.org>; Thu, 29 Aug 2019 09:14:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3716; q=dns/txt; s=iport; t=1567095288; x=1568304888; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=dfZoXr7y9Cjz5oBctgy6XrRu4J8sO1k+qTqFPRmU8O4=; b=SACyuAgnv6RzY8IdrTIrVqWLhQ2INENrohUPqxFC07sZu4R0bM5RZVYp gM3avaM/p3afEucmcshaXIjQmOJZro/k0JIL+56y5C7YOLwwfNAdtepdK nZ8GRd5e/pqAIO+ZwkhZLLfczaTLkfwnREqAULL1HMLz2dgeg5gBgoGjW o=;
IronPort-PHdr: =?us-ascii?q?9a23=3AtFjRIBXR9BPbcwcKY2oIn5C1dzfV8LGuZFwc94?= =?us-ascii?q?YnhrRSc6+q45XlOgnF6O5wiEPSA92J8OpK3uzRta2oGXcN55qMqjgjSNRNTF?= =?us-ascii?q?dE7KdehAk8GIiAAEz/IuTtankgBs1CUVZj13q6KkNSXs35Yg6arw=3D=3D?=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AzAACW+Wdd/40NJK1dCRoBAQEBAQI?= =?us-ascii?q?BAQEBBwIBAQEBgVYCAQEBAQsBgURQA21WIAQLKgqEF4NHA4pxTYIPl2qCUgN?= =?us-ascii?q?UCQEBAQwBARgLCgIBAYQ/AheCQiM3Bg4CAwgBAQQBAQECAQYEbYUuDIVKAQE?= =?us-ascii?q?BAQIBAQEQEREMAQEsDA8CAQgYAgImAgICJQsVEAEBBAESIoMAAYFqAw4PAQI?= =?us-ascii?q?MoBMCgTiIYXOBMoJ8AQEFhQwYghYDBoEMKAGLdhiBQD+BOB+CTD6CYQEBgTc?= =?us-ascii?q?qF4J0MoIEIo8mnGYJAoIelFMbmF2Nb5g3AgQCBAUCDgEBBYFmIoFYcBU7KgG?= =?us-ascii?q?CQYJCg3KFFIU/coEpjSsBgSIBAQ?=
X-IronPort-AV: E=Sophos;i="5.64,444,1559520000"; d="scan'208";a="327412235"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 29 Aug 2019 16:14:47 +0000
Received: from XCH-RCD-008.cisco.com (xch-rcd-008.cisco.com [173.37.102.18]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTPS id x7TGElOG001190 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 29 Aug 2019 16:14:47 GMT
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by XCH-RCD-008.cisco.com (173.37.102.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 29 Aug 2019 11:14:46 -0500
Received: from xhs-rcd-003.cisco.com (173.37.227.248) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 29 Aug 2019 12:14:45 -0400
Received: from NAM04-CO1-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-003.cisco.com (173.37.227.248) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 29 Aug 2019 11:14:45 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SVi31IS+eWVKlddlLSwbEzd9dtvlfdIotNjAP2hO7LbwsFwrSbyxpVsWkKxkeqkHkn9465UQlm/AYU4J05/XxjU88VsjEZ/m34Rh7B22qWdMSXtbBEyUc+T0cKu9yvIL7YZwmIsUlK9LZQ5Y3GDzVRWaP+LTLtf8FF1vnzbFBel/xbe3SnHtbN3fIc6fYVOsy2Okp002l0HhMK6Y/inQsXYL4sN5r6ACI85ezmFj8d0oaX44cU4HA2kQkDEQCAJZctcxNXEXnMAL1kVI51yrhGuahHXcL2hPzsXySc2E768TpQo/V9AMn4dOT1Va0x9tVayMxHpyWa7nwReX2d7fzQ==
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=dfZoXr7y9Cjz5oBctgy6XrRu4J8sO1k+qTqFPRmU8O4=; b=cHqZ4EmxWgFRajQK7dvf4LiNsTpLtPCVFs0Kdz3O7nTGCGsafh3S3xpPepouNzutClV3RaSiAk/EoFBAAbbRzXxmQ1oSMv/9LROMU6hTAcxlAyL7vb9thLlB62uNPWOjwmsOXW4DhXaaQg5p3OvZabnVV0M+eMs2iUVAJVX2UfrQhgLBh8fSqGo3Udg45H5V5Wch1Ik3aJpMV60OQSqb5qpR5FmaEsyFOCuaYV6BslzeeLNPHzyyLB20m+OGLLy2uYFcgjwL8+ZDHLowpZoWdkdp+SajCMR5ObAMi0NWo6qMJ/3oEmC4AwEZd2lxw3vqO7VDdWIEEvWxYJHG6/pcYw==
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=dfZoXr7y9Cjz5oBctgy6XrRu4J8sO1k+qTqFPRmU8O4=; b=kgmE8fv8C9J1g/9ny0+IaeWRC95nXsUT7r5VN9hOF91bIni+PkdMzAvhecnIEHJQr0M+ZHSVlbmK+IOm+vkusSZW3e79ZzGXqR08om7k+FwmETaPFbU6S0af8er8N6GSAOArvfFtqgk90LShrbRMBldyJOq7J1vetyvwt3k72GQ=
Received: from MN2PR11MB4157.namprd11.prod.outlook.com (20.179.150.223) by MN2PR11MB4365.namprd11.prod.outlook.com (52.135.38.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.19; Thu, 29 Aug 2019 16:14:44 +0000
Received: from MN2PR11MB4157.namprd11.prod.outlook.com ([fe80::80bb:d4b:bc47:7daf]) by MN2PR11MB4157.namprd11.prod.outlook.com ([fe80::80bb:d4b:bc47:7daf%3]) with mapi id 15.20.2199.021; Thu, 29 Aug 2019 16:14:44 +0000
From: "Reshad Rahman (rrahman)" <rrahman@cisco.com>
To: Ladislav Lhotka <lhotka@nic.cz>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "Rob Wilton (rwilton)" <rwilton@cisco.com>
Thread-Topic: [yang-doctors] Identities vs enums
Thread-Index: AdVeUoj6Gm62w2r9QP2N1RJZSFrmWQAB+7+AAAIQ1wA=
Date: Thu, 29 Aug 2019 16:14:43 +0000
Message-ID: <4F863200-9E35-428E-A3C6-53187ACC83B8@cisco.com>
References: <MN2PR11MB4366B7D24FF907FE8E0802E9B5A20@MN2PR11MB4366.namprd11.prod.outlook.com> <c0c6bb8f1fe8ebe910c09ff764f43a2d84907d42.camel@nic.cz>
In-Reply-To: <c0c6bb8f1fe8ebe910c09ff764f43a2d84907d42.camel@nic.cz>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1a.0.190609
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rrahman@cisco.com;
x-originating-ip: [173.38.117.83]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 97a2ebe9-afbe-47fa-2c72-08d72c9c012d
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR11MB4365;
x-ms-traffictypediagnostic: MN2PR11MB4365:
x-ms-exchange-purlcount: 1
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <MN2PR11MB4365DC59ABF882AE5ACDBC7CABA20@MN2PR11MB4365.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 0144B30E41
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(39860400002)(346002)(366004)(376002)(199004)(189003)(64756008)(66556008)(66446008)(316002)(6512007)(110136005)(66476007)(76116006)(66946007)(6246003)(6306002)(6486002)(26005)(58126008)(25786009)(6636002)(486006)(11346002)(6116002)(3846002)(71190400001)(446003)(36756003)(71200400001)(6436002)(66066001)(6506007)(476003)(102836004)(2616005)(229853002)(99286004)(33656002)(5660300002)(8676002)(81156014)(81166006)(966005)(8936002)(76176011)(256004)(2906002)(305945005)(7736002)(53936002)(186003)(86362001)(478600001)(2501003)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4365; H:MN2PR11MB4157.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-message-info: PATvLDV8ulb7aTx26lh4ugFm/r7miRdOWwv3HJkXBl/15swRwlkPmK6B1Yqa3MCHtSCMQmlZcIUViyOen7ZMALK+z+bOyhY5LpjpgsqxWORJ5Ta3+pce05p4CZ3e+JYaVlZF1o4y4am1s1HSsYeiFifzyyaJyk/3MqgfAODFu3Uval72iFccYaGbegEYzA4YTfv9VbP8PfbTKjSKq81Q8SoPcPQd0KzEs7JqOJdMNhuYoa8mth8isD/5/ky3LvGiHtH5O/aqhHzuHD+MTeBUuhGVB0uEGzbWRnmBPly+uldV6HG7BfCOovm9VhUpj0uum0DaU++/9q532PEInkLUN3r+9qP+o/4rtFce9waSZzzWTm0XT/NDblGUnFsVI34K7qzuJmEIakuxG/JLtOha85pHqUBRd/QuTSYwcRu09Fc=
Content-Type: text/plain; charset="utf-8"
Content-ID: <F2B8D3CD118A7649A1A7BC10F290A3D2@namprd11.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 97a2ebe9-afbe-47fa-2c72-08d72c9c012d
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2019 16:14:44.0113 (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: 0ef9KxgFor76dMSBCc5LoqXB5/yr8Aidq2RAFwxdc6rgUUN/02m33bGHn96rRZaTI+NZr7wKqP3iuASUots+uw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4365
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.18, xch-rcd-008.cisco.com
X-Outbound-Node: alln-core-8.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/SHxEuK_hb9snpo55Gtj3Y416W_4>
Subject: Re: [yang-doctors] Identities vs enums
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: Thu, 29 Aug 2019 16:14:52 -0000

+1 for option 2.

On 2019-08-29, 7:11 AM, "yang-doctors on behalf of Ladislav Lhotka" <yang-doctors-bounces@ietf.org on behalf of lhotka@nic.cz>; wrote:

    On Thu, 2019-08-29 at 10:24 +0000, Rob Wilton (rwilton) wrote:
    > I doubt that this is the first time that this has come up …
    >  
    > draft-ietf-netmod-intf-ext-yang-07, defines 3 identities (along with a base
    > identity) for loopback configuration: “loopback-internal”, “loopback-line” and
    > “loopback-connector”.
    >  
    > One of the reviewers is complaining that the “loopback-“ prefix in the
    > identity is redundant and noisy.  I.e. he doesn’t like having to write
    > loopback=’loopback-internal’, and would like to be able to write
    > loopback=’internal’ instead.
    >  
    > His main suggestion is to move these loopback (or perhaps just the identities)
    > to a separate YANG module so that they don’t need to define a “loopback-“
    > prefix.
    >  
    > There seem to be some choices here:
    > (1) Keep with identities with a "loopback-" prefix.  This causes
    > loopback='loopback-internal'
    > (2) Keep with identities, but loose the common prefix, i.e. the identities
    > become "internal", "line", "connector".  Given the size of the module, the
    > likelihood of an identity naming clash in future seems quite small, but they
    > are somewhat generic terms.
    > (3) Use shorter identity names, but also put them in a separate types module
    > (as requested by the reviewer).
    > (4) Use an enum rather than identities.  Although this has the potential issue
    > that the enum cannot be extended (which I’m wondering if this is something
    > that we should consider changing in the hypothetical YANG Next).
    
    I would go for (2).
    
    In fact, the namespace for identity names probably needn't be module-wide, I
    think it would be perfectly fine to require unique names only for identities
    derived from the same base.
    
    Lada
    
    >  
    > Personally, I’m toying with changing to 4 or perhaps 2.  I’m not keen on 3.
    >  
    > Any thoughts or opinions from the YANG doctors?
    >  
    > Thanks,
    > Rob
    >  
    > _______________________________________________
    > 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