Hi authors,

I am one of the authors of the draft-ietf-alto-oam-yang draft. Our draft is
trying to reuse some groupings and typedefs in this document to support
some TLS authentication features. But we find the current typedef
'public-key-ref' cannot be used by another module.

To be more concrete, in the current document, the path of the typedef
'public-key-ref' enforces a prefix of the relative path to the sibling
'public-key-bag' leaf:

   typedef public-key-ref {
     type leafref {
       path "/ts:truststore/ts:public-key-bags/ts:public-key-bag"
         + "[ts:name = current()/../ts:public-key-bag]/"
         + "ts:public-key/ts:name";
     }
     ...
   }

>From my understanding, this typedef is for other modules to reference a
public key in the trust store. The sibling 'public-key-bag' leaf should be
in the same module of the leaf using this typedef, instead of the module
'ts'.

To make this typedef usable, I believe it should look like the following:

   typedef public-key-ref {
     type leafref {
       path "/ts:truststore/ts:public-key-bags/ts:public-key-bag"
         + "[ts:name = current()/../public-key-bag]/"
         + "ts:public-key/ts:name";
     }
     ...
   }

Otherwise, we have to define another typedef in our own module like this:
https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/blob/284d2e630cec00f752ea94f586469797786c6f57/yang/ietf-alto.yang#L612-L628

Thanks,
Jensen
_______________________________________________
alto mailing list
alto@ietf.org
https://www.ietf.org/mailman/listinfo/alto

Reply via email to