An excellent example! This make me realize that my previous understanding is a little bit shallow. Especially it make me clear how can this URI identifier be human readable and programing safe. What a pity is that not all the YANG models define in IETF are using this URI identifier. This leaves them fragmented, independent, unable to play to the strengths of one system. Sometime some ID conversion interfaces would be needed if we want to use these models at the same time. This is ludicrous in the integration progress. Anyhow, many thanks to Robert!
Best Regards, Chaode -----邮件原件----- 发件人: netmod [mailto:[email protected]] 代表 Robert Varga 发送时间: 2022年5月27日 21:09 收件人: yuchaode <[email protected]>; 'Kent Watsen' <[email protected]> 抄送: [email protected]; Chenchunhui (C) <[email protected]>; liuzhoulong <[email protected]>; Fatai Zhang <[email protected]>; Zhenghaomian <[email protected]> 主题: Re: [netmod] 答复: A question about YANG identifier design On 26/05/2022 05:12, yuchaode wrote: > Thanks Kent, > > I think the common understanding with me for the benefit of string > format is that string format is generic and easy for implementation. > But I am still confused how can this URI string can help to correlate > identifiers across systems. Could you help to provide some more detail > information? The key point there is that URIs imply an extensible structure, which neither strings nor UUIDs convey. The tie in is into URI namespace -- and how exactly an implementation or deployment does that is up for grabs. For example you can use URNs, and specifically "urn:uuid:XXXX", et voila, you are using UUIDs, but everybody who sees that identifier knows it is a UUID, not just something that happens to look like an UUID in the sample that you've observed during integration. Or you can design your own URNs, and say that we have three separate namespaces in urn:com:example:id:{network,node,link} and each of them is used to assign identifiers for networks, nodes, links -- and enforce that at system boundaries. Suddenly your identifiers are type-safe and errors like https://www.atlassian.com/engineering/april-2022-outage-update are either completely preventable by system input validation or obvious to humans communicating them: A: Can you deactivate application "urn:com:example:id:site:XYZ", please? B: Right, but that's not an application ID! Regards, Robert _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
