Subject: [netconf] Fwd: [netconf-wg/trust-anchors] Missing prefixes in typedefs certificate-ref and public-key-ref (#1)

From: Kent Watsen <[email-masked]>
Date: Wed, 15 Jul 2020 18:23:37 +0000

The following issue was submitted via GitHub issue tracker.

I admit that I’ve been lax in prefixing nodes in paths, and it likely occurs in the entire collection of drafts that we’ve been working on.  Honestly, when a prefix should NOT be used isn’t entirely clear.  The grouping rules allow for local-scope resolution when a prefix is not specified, but when that might be needed or useful is unclear to me.

Unless there is an objection, I plan to add prefixes to all paths in all the drafts.

K.

> Begin forwarded message:
> 
> From: Nick Hancock <[email-masked]>
> Subject: [netconf-wg/trust-anchors] Missing prefixes in typedefs certificate-ref and public-key-ref (#1)
> Date: July 15, 2020 at 4:59:05 AM EDT
> To: netconf-wg/trust-anchors <[email-masked]>
> Cc: Subscribed <[email-masked]>
> Reply-To: netconf-wg/trust-anchors <[email-masked]>
> 
> 
> yanglint flags an issue when using the typedefs 'certificate-ref' and 'public-key-ref'.
> 
> Since the typedef references nodes in ietf-truststore and the node, 'certficate-bag', defined in another module as a sibling node to the node where you reference a certificate, you need to use prefixes on all nodes within ietf-truststore.
> 
> If you change the definition, for example, of certificate-ref as follows, yanglint, then returns no errors when the typedef is used:
> 
> typedef certificate-ref {
> type leafref {
> path "/ts:truststore/ts:certificate-bags/ts:certificate-bag" +
> "[ts:name = current()/../certificate-bag]" +
> "/ts:certificate/ts:name";
> }
> description
> "This typedef define a reference to a specific certificate
> in a certificate bag defined in the Truststore. This
> typedef requires that there exist a sibling 'leaf' node
> called 'certificate-bag' that SHOULD have the typedef
> 'certificate-bag-ref'.";
> }
> 
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub <https://github.com/netconf-wg/trust-anchors/issues/1>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AARGT6UNK5HM2RXXW2MTHEDR3VVVTANCNFSM4O2KHCZA>.
>