Carsten Bormann <c...@tzi.org> wrote:
    > draft-ietf-core-sid defines a file format for the interchange of
    > YANG-SID allocation information.
    > This is a JSON file, a data model for which is provided in YANG (via
    > RFC7951 YANG-JSON).

    > The spec of course also contains an example instance of such a file,
    > which is directly useful as the SID allocation for the ietf-system YANG
    > module.
    > However, it appears that the YANG ecosystem currently does not provide
    > a way to mechanically validate that instance against the YANG model.

Yes... I was told to use yanglint, but it's not actually capable of parsing
all the new fangled things.

> I find this rather unsettling.

Me too.  I'm not yet convinced that the examples in **RFC8366** even validate
correctly, which makes it hard for me to know if 8366bis is actually correct.

    > Since we just did a global change (to fix our incorrect representation
    > of uint64 in YANG-JSON), I wanted to make sure the SID file is not
    > broken.

I will probably be on the hook to fix sid.py to round trip the revised
content, so anyone who wants to unicast me and tell me if there is some magic
python that makes it do the right thing, I would appreciate it.

    > So I translated the YANG model into CDDL (and, yes, the example instance 
does validate, phew).

Even without any kind of top-level wrapper dict?
I see you added:
"ietf-sid-file:sid-file":

which pyang *does* insert or parse, and I suspected that it was wrong not to.

I think you did this manually, right?

    > While I was at it, I remembered that there are a few other RFCs (or
    > soon-to-be-RFCs) that would benefit from having CDDL models handy.

    > So I wrote an I-D [1] that presents a number of such models, including 
the SID-file model.

    > [1]: 
https://www.ietf.org/archive/id/draft-bormann-cbor-rfc-cddl-models-00.html

2.4. Your favorite RFC here...

RFC8366.
Not seeing a venu for your draft.

The thing is, once it gets translated to CDDL, I'm actually not sure I want
to keep the YANG anymore.  A huge huge huge amount of effort on our part, for
almost zero benefit.  We didn't really have CDDL 8 years ago, so we had no clear
alternative when we started, but I sure wouldn't go down the YANG path again.







--
Michael Richardson <mcr+i...@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide




Attachment: signature.asc
Description: PGP signature

_______________________________________________
Anima mailing list
Anima@ietf.org
https://www.ietf.org/mailman/listinfo/anima

Reply via email to