Re: [netmod] question about unprefixed path in leafref
"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Thu, 10 February 2022 15:34 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 290723A09FE for <netmod@ietfa.amsl.com>; Thu, 10 Feb 2022 07:34:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.473
X-Spam-Level:
X-Spam-Status: No, score=-2.473 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.576, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_NONE=0.001, 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 nZ29uNs1-nKb for <netmod@ietfa.amsl.com>; Thu, 10 Feb 2022 07:34:23 -0800 (PST)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2072d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::72d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A8AE63A09D1 for <netmod@ietf.org>; Thu, 10 Feb 2022 07:34:23 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LgR3VM7fKEPJJ07vorPsOIdoNLTLpCZqml8vUrHSCk1SCCqSyThchSpFywlLi6mz/cVLHJ5DhdSRlZ27yvjmKk5LOD8KLKYUWTC1jNa8KI6NAnXq53/yLtZ0Vo7WpcwgNN0mZbXgQZROa9mYisNqcXtGcoF2MYjKyomqJcoiFUea2wxQtfnrXm8w5yw1OWTgkf9j864L0FsYYa/0hOy9N9t9A1H5zrsPae4aKybyWICqvGw4gBpuuHlq54bLOPrj4Y8JU/lO0gg04S0H2iVBEv10Rki5QnGR3qD2DLhOs3khoMu27ONn7XWBEoHQqz0T+72a5xHtgKbbq86tGA3S7A==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y6p38mt8xiDLmFI8o6xfXVYvr+R+HzzLFvnI4tKtJ2Q=; b=J2Cy0kJhQEnaIX7+jCyBYmFOTUmH+U0IC+H8FxQdaINQhoyfWM6gJ99rNa1zyvRHWunHofbSmi/X32aRmRF3gFXoyBhXbCPUXXjkIE/P2FJNKgbk+vDStZNPbFNSDn0kx/Ssdm3l4fLJOnjqm0UNPn0XdTs/EIqxtPXiJ/kXjwYjY8uPuAZuRAZaHfMis+RIJ5ARDvEWWDmPzl7mWP4YwxRvUQOIjT7JTK9r2pY5OjdL529zhCCto5BxCMI4UAUcix+5V9MC5ERFoHJ2xReJY+AIJH7JhRJcioY7w5pQo3OFFkjeQ6HIjMBdCCzywq33LU99BfvHXNx60Z87es+DHQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y6p38mt8xiDLmFI8o6xfXVYvr+R+HzzLFvnI4tKtJ2Q=; b=jue0xgb/5ONng0G+iEjNTQ84fCmKtWynge2ubwNQuv6HH1FF/s+TslO1F5VGlst3VkwLHb4ZMWp011HZ7v6P0fChOldp7/v72/OnMlnJVbfbPMQGqMRkoos6HKFaoNxMfZpmpCCcckRGSCosOHTgqooBKEfyjuHSfKh5Wb0jBQU=
Received: from DM6PR08MB5084.namprd08.prod.outlook.com (2603:10b6:5:41::29) by CH0PR08MB7441.namprd08.prod.outlook.com (2603:10b6:610:ea::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 15:34:18 +0000
Received: from DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::d937:3404:2dfc:eb33]) by DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::d937:3404:2dfc:eb33%4]) with mapi id 15.20.4951.019; Thu, 10 Feb 2022 15:34:17 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Jernej Tuljak <jernej.tuljak@mg-soft.si>, "Fengchong (frank)" <frank.fengchong=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] question about unprefixed path in leafref
Thread-Index: AQHYHZG/tNDDmdN9xk+U2baRy/EU/qyM66gA
Date: Thu, 10 Feb 2022 15:34:17 +0000
Message-ID: <DM6PR08MB5084A75FA033B6C10B91B52F9B2F9@DM6PR08MB5084.namprd08.prod.outlook.com>
References: <70d5c82cf41042e28aa71cfd39a147ab@huawei.com> <fd4bdca6-ba49-493a-4d2a-fe70dd3941f6@mg-soft.si>
In-Reply-To: <fd4bdca6-ba49-493a-4d2a-fe70dd3941f6@mg-soft.si>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 358c2809-e9ae-48d8-ea21-08d9ecaacca5
x-ms-traffictypediagnostic: CH0PR08MB7441:EE_
x-microsoft-antispam-prvs: <CH0PR08MB744177DC2B77D9090A65F9679B2F9@CH0PR08MB7441.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: WYIeTYMpO+dWhQ5rQT4/E8yMJQWZJKO8PBKcT04dkvsc0HaaxTZh9BwMS13ZgRZRD9lJx12T4xH5bsDVKwe22KiALhE0YdZZx0p0g6Te3+5afFAV6Z8GdRPXc4+X9sWcz0UbYNn01cFTIwc0vEswCvwJq4h8L3DgiRdl2FXS0c8Izq4R44R93737LxROwhtDlWykfPBoKMC65h3pX+siLkk3jKV0LuxA0GaQQDDSjHoQc23AeCsdZMQkly52dGulIW6EpWEltzHlxUpQZBRJIFIIabncUOMkdmBrWAAPqi8OJeEzF8EbrwCyWTEfx1eVe/6q18gwkXzinlSrrM5xBi00+rSrTuiFom/ksgc/iZEBmMUiw7P6Y1kYhsPU8ihIOvYi9O6OqkBDXNDPXmcLt/9h/ko82UBpi+NWoUJGwO55cxNeJ54MgD00XrSYAwew0uQGCOZD49SjU5259spZOSL2PobCopticf6betnXz6JBMKHQa6g18AWCpNh9rFVlW2lbKGSWCECv8WZApvev4qwCFD6AB7F42OCUxiSpUe/JX6bVCyt0kU9FEqu0eVnsHIwU+VAcoqbbk/3oxKs/wG5wc7pBlM/FBr1qcjWwMC5KQJa95sAHfsw15yr/cWzfkZZ5vrirYXHPrO5Sxj8Q32R9bpcKVAIgw1fzxJUwYuNGKIBuRTuuvnPLA09dpl8WtwCTWtfeJzaSZXvhnPxia/Mtna2SyjQwxjivsg3n+YpXrk69cnK0Wedes0Uxiey49rjBShdyBcS7IDREJUOUrGo6CYV17XHQt0ZsNyrsA+P4voS5KboywOBayXk+xzH5aPjKb+loZ/FQvfE5iJCPHoLVJ5wii4gbNgwTYHdRj2c=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR08MB5084.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(33656002)(83380400001)(508600001)(966005)(71200400001)(19273905006)(2906002)(5660300002)(55016003)(8936002)(86362001)(8676002)(26005)(66946007)(66556008)(66476007)(66446008)(64756008)(53546011)(110136005)(52536014)(9686003)(122000001)(38070700005)(166002)(316002)(38100700002)(76116006)(6506007)(186003)(82960400001)(7696005)(21314003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: qGNvzuKvSh5i8/+I+2rEWeXmm4NTe91/8zncc9pNhvhsq69/ib8cClWslTnYxwRrBH++wU3QWrFOnhs1kjzMhAteKTNrsXrDFyO62sNhNIJFK/lZKh3gP4ppMoAyA4YE5bBtmkmm0ONVUT3+bhYXdEQMaZrDk/0ARXJNQ+ttdVx2TCS81kS0/91dAnpFKRaapPhtnNfXPo7D3Iwxy1azCoyv6JvFFXWFf7XMnOkLfQQkkPEVQ4EzZ9Y6pkMt4qqAzRk86llKVhcT4AYKtGE34+uHSazDYgzJrsbkEfRXj8QbHDBTjwpcBxUihcxn+vS189Udw1zU38ifMVMz6FAsbyTxcEwWGn5TMDpX9yWe2vqzfhzvJaJFC+IeIlMk7a4tIlsKc4lgUbRyzINCxkU3KoXk0byRrtTrNKENtC6jRHtYHhT9LJukIOg8+XR06PyL63n4CrfzSIi2dWnSPhuMD53sF6kq0X4sEoA+MWEqfCUeoBNrAwf3n1DniC8ejhCIBTqYT/ma9MJb6D0wtRZ2rP4623fwhV86f79qPlCzYkzGZzGar688O0GiZQoP+jRizVPXC0OeTYIBaPKLFAvqecFG2FY/7cWngzevMtPcYf9XXirVljpK8VHymnxivtICVvQaUr8IBehwMZtWuoylyCDl5W7tC43CjNP7zLtPa8B1OwQad9Vr59uOBx7qvZBnojtq6ifCdP3C3csSydmsX6eVTwt5ij7S0DyMNhWlSTMoUk4YR2mf3RvaTLrgGcD4+uRZLTI1Q3HTURvjkjTd713BCBIGC8wofsvT9AlU535IjJ9mXivp6UCNN0x0pN4U5XBqgIVCKZnxSGQPGmp9a9wX4itcuFsJuhYYVA8pwgHIfMo3jn0mfn5HTRxNQtGS8APD+Y9dgcEXRvc1iAADfIMArJeEZ+98+DG8aQ7FDuvgQf1YtaIXKlSdq2SK8dvtUgs+g38tvch4Vu6IrC/KRxWvnZLAs83KMvGKGyC9rda4hoQrik8Tq5pXSS7LO7et7mWqZwpchLgIwOQGfFkgoCHElL+HzyVJ8ig4RnxQKqeSkY7tKyuBy3fq+x3LzABEVw8o278lvtVp1vIGq2l1GVpXHRmCnD/krZqPwYSWm5E12X0Af8K2uR5BEdJ5x4xNjdv2bC5gZd7Sa+bpmbQ9QsVoGrFrD5zyJqP64weikHTLA+dBmpUPhWL+DcGLgWvJ5cEab48oeCkpnD3ZBHa6tGFZnXXAhca1dfc+JBBV/qOxlnrJqSjFYM2B1wtV34wrxHevMLL1YA2jC+wNpPnm5G0vYSPT1legp74IfhMCNQwUaxP6hJvbhQrTsg0JTM8BpShtk7QdC567N7mHMZ+K38MQLD9HWNcO04x8v7O+gcMhBj6drXeMfTaYa2XzGTsjpTLGSvbERR9P5zDGvqtkbPgTW0U5MtiD1TjBta8Vjf3mJoVfvKdX/i4jVxmXv7cmLP8HPqLMeeVcZcqUdnZ0+bYdAPSJJmj+WfZn/9gxY0joo0wVXEksQrMy+LzKnzvq8DzbmfNdoNDlIHq4MZvcYnH3uIee9u3p3JESbgHcdMDRAkWVfxl1UKo4hfBKDiQkZceYh3rP6yA1ko21AbZ7ag==
Content-Type: multipart/alternative; boundary="_000_DM6PR08MB5084A75FA033B6C10B91B52F9B2F9DM6PR08MB5084namp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR08MB5084.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 358c2809-e9ae-48d8-ea21-08d9ecaacca5
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 15:34:17.0406 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 7Dt34VpfAaVhChRnagDJEyWQy3Gio0vgD/I26yFqwf1oj8jbBBCwwJdQfAdc1LomAsAZEegk/PDhcKXqIiAt0Q==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR08MB7441
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/wgXtuTVU3-8dUReDW_b9KNr-KfM>
Subject: Re: [netmod] question about unprefixed path in leafref
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: Thu, 10 Feb 2022 15:34:28 -0000
Hi all, This immediately made me worried about all such xxx-ref constructs in YANG that I've seen in a few modules. But looking at IETF interfaces https://datatracker.ietf.org/doc/html/rfc8343 I see that this error is avoided because interface-ref is fully qualified right ? typedef interface-ref { type leafref { path "/if:interfaces/if:interface/if:name"; } description "This type is used by data models that need to reference interfaces."; } Jason From: netmod <netmod-bounces@ietf.org> On Behalf Of Jernej Tuljak Sent: Wednesday, February 9, 2022 3:47 AM To: Fengchong (frank) <frank.fengchong=40huawei.com@dmarc.ietf.org>; netmod@ietf.org Subject: Re: [netmod] question about unprefixed path in leafref On 08/02/2022 03:40, Fengchong (frank) wrote: Hi all, In RFC7950 sec6.4.1 says: o Names without a namespace prefix belong to the same namespace as the identifier of the current node. Inside a grouping, that namespace is affected by where the grouping is used (see Section 7.13<https://datatracker.ietf.org/doc/html/rfc7950#section-7.13>). Inside a typedef, that namespace is affected by where the typedef is referenced. If a typedef is defined and referenced within a grouping, the namespace is affected by where the grouping is used (see Section 7.13<https://datatracker.ietf.org/doc/html/rfc7950#section-7.13>). But in module openconfig-aft-network-instance: augment "/oc-ni:network-instances/oc-ni:network-instance/" + "oc-ni:afts/oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" { description "Add leaves that require referencing of a network instance to the operational state parameters of a next-hop within the AFT for IPv4 unicast."; uses aft-nexthop-ni-state; } grouping aft-nexthop-ni-state { description "Operational state parameters relating to a next-hop which reference a network instance."; leaf network-instance { type oc-ni:network-instance-ref; description "The network-instance within which the next-hop should be resolved. When this leaf is unspecified, the next-hop is resolved within the local instance."; } } The typedef network-instance-ref is defined in module openconfig-network-instance: typedef network-instance-ref { type leafref { path "/network-instances/network-instance/config/name"; } description "A re-usable type that can be referenced within other modules that references a network instance."; } The leafref’s path is a unprefixed path. So, according RFC7950, the typedef network-instance-ref is referenced in leaf network-instance, and the leaf is inside grouping aft-nexthop-ni-state, and this grouping is used in augment "/oc-ni:network-instances/oc-ni:network-instance/" + "oc-ni:afts/oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" So the path "/network-instances/network-instance/config/name" ‘s namespace is module openconfig-aft-network-instance’s namespace. But in fact, there is no node called network-instances with namespace: http://openconfig.net/yang/aft/ni. Is it incorrect? I try to use pyang to compile it, and no error is reported. These modules are written in YANG 1.0, therefore RFC6020 applies, not RFC7950. This was one of the cases where RFC6020 was unclear, hence new text you quote from RFC7950. If you change openconfig-network-instance to YANG 1.1, pyang should report an error for that "path" when the "typedef" gets used in openconfig-aft-network-instance. Jernej 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it! _______________________________________________ netmod mailing list netmod@ietf.org<mailto:netmod@ietf.org> https://www.ietf.org/mailman/listinfo/netmod
- [netmod] question about unprefixed path in leafref Fengchong (frank)
- Re: [netmod] question about unprefixed path in le… Jernej Tuljak
- Re: [netmod] question about unprefixed path in le… Sterne, Jason (Nokia - CA/Ottawa)
- Re: [netmod] question about unprefixed path in le… Ladislav Lhotka
- Re: [netmod] question about unprefixed path in le… tom petch