Re: [netmod] A question about YANG identifier design

Kent Watsen <kent+ietf@watsen.net> Wed, 25 May 2022 17:04 UTC

Return-Path: <01000180fc2d869d-8284af4c-ba30-4e21-9824-d99d03f260f3-000000@amazonses.watsen.net>
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 76881C1D4678; Wed, 25 May 2022 10:04:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 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_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uJXIQn1a4NrM; Wed, 25 May 2022 10:04:45 -0700 (PDT)
Received: from a48-90.smtp-out.amazonses.com (a48-90.smtp-out.amazonses.com [54.240.48.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 537BAC2B000A; Wed, 25 May 2022 10:04:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1653498284; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=29mWLc3P0WKKfLTBV84IRwREljSRckQQNW9d6HPmWqo=; b=FeUUh8jClav25BYXQ8ZoCVZR0KOjp29l0fs3ur0MW1wzQCGfxSh+OgcnD3LQMvGZ 5E4KfpHkQ1d20JXVNeBem10+hl2pKBTkwgxYY190ywFAdjDcU17yHCIOhtkVa3LaNnh z03CcKzxY4woYRm9Q/bs3/zk69nxFdWWDjWlu6+4=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <01000180fc2d869d-8284af4c-ba30-4e21-9824-d99d03f260f3-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_3B4515DA-95FE-4083-85E0-9AAA37253A73"
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\))
Date: Wed, 25 May 2022 17:04:43 +0000
In-Reply-To: <86c348fb32b14dda97644c8893057588@huawei.com>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netmod@ietf.org" <netmod@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>, Fatai Zhang <zhangfatai@huawei.com>, Zhenghaomian <zhenghaomian@huawei.com>, liuzhoulong <liuzhoulong@huawei.com>, "Chenchunhui (C)" <chenchunhui@huawei.com>
To: yuchaode <yuchaode=40huawei.com@dmarc.ietf.org>
References: <de9b838f10a448c9991d0a381d426716@huawei.com> <20220524101546.cfzkzi55dsutfyic@anna> <f97fd7815d8147a680798dd5159f0594@huawei.com> <20220525072213.udkoy7lejf2qk2iq@anna> <c85dc299766941f7b3749c1572c6ccb3@huawei.com> <20220525081828.kwpbiw43ck4wizw2@anna> <9af6251a5fbe4c338bace6cccece1cde@huawei.com> <20220525083544.ymzco56byey5zt4w@anna> <86c348fb32b14dda97644c8893057588@huawei.com>
X-Mailer: Apple Mail (2.3693.60.0.1.1)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2022.05.25-54.240.48.90
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/aUf4mWygfZfmqsXaY9HrN_uJfGU>
Subject: Re: [netmod] A question about YANG identifier design
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.34
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: Wed, 25 May 2022 17:04:47 -0000

> Thank you all the same for your comments!
> And I also find peaple who are designing YANG module in IETF don’t like to use uuid. They prefer to use a string for identifier. String type is generic and easy for implementation but there is not a good way to make it global unique and easy for reference.

It's notable that RFC 8345 uses URIs, the reasoning for doing so is described in Section 4.4.11. Identifiers of String or URI Type <https://datatracker.ietf.org/doc/html/rfc8345#section-4.4.11>Section 4.4.11. <https://datatracker.ietf.org/doc/html/rfc8345#section-4.4.11> Identifiers of String or URI Type.

PS: though the draft says that all the identifiers are URIs, all the examples in the draft use simple strings.  AFAICT, none of the examples in that draft would pass validation.

K.