On Sat, Jul 22, 2017 at 08:47 Michel Veillette <
***@trilliantinc.com> wrote:
> Hi Andy
>
>
I think 2 sets of media types addresses all my concerns. It is very simple
to define a YANG to CBOR encoding that aligns with the standard data naming
and instance value encoding. It is very easy to use the Accept header to
insure interoperability. This "plain" encoding can be quite useful for
RESTCONF. We have already implemented RESTCONF over CoAP and plan to use it
for that as well.
Andy
> We do recognize the additional risks if SIDs are unmanaged.
>
> This is why we work actively on the development of the registration WEB
> site.
>
> As soon a beta version is online, I let you try it to see if it address
> your concerns.
>
>
>
> Regards,
>
> Michel
>
>
>
> *From:* Andy Bierman [mailto:***@yumaworks.com]
> *Sent:* Saturday, July 22, 2017 6:53 AM
> *To:* Michel Veillette <***@trilliantinc.com>
> *Cc:* Carsten Bormann <***@tzi.org>; Core <***@ietf.org>
>
>
> *Subject:* Re: [core] yang cbor encoding without SID
>
>
>
> Hi,
>
>
>
> I am not going to explain it anymore.
>
> The order most statements appear in a YANG file is irrelevant to the
> semantics of the YANG module
>
> except (1) auto-numbering of position or value and (2) evaluation order of
> union member types.
>
> Keeping the SID files perfectly aligned with the YANG fie is a challenge.
> There is no way for
>
> a module to get out of synch with itself wrt/ schema node naming or
> instance value evaluation.
>
>
>
> So of course the tools will be perfect and the developers will be perfect
>
> and never let the registries and implementations get out of synch.
>
> Otherwise SID will produce incorrect results.
>
> If you cannot recognize the additional risks introduced by SID,
>
> you probably need to study RFC 7950 a bit more.
>
>
>
>
>
> Andy
>
>
>
>
>
>
>
> On Fri, Jul 21, 2017 at 7:45 PM, Michel Veillette <
> ***@trilliantinc.com> wrote:
>
> Hi Andy
>
>
>
> I will agree with you on one point, some implementers might have defined
> carelessly 'value' and 'position' because these statements was not useful
> for their NETCONF or RESTCONF implementations. This is not an issue with
> YANG but with those developers. I don't agree that the designers of the
> YANG modeling language put these statements in the schema definition just
> for fun. They certainly foresaw the time YANG will be implemented in binary.
>
>
>
> The impacts on the yang to cbor mapping is however limited. The YANG
> specification and YANG validators guarantee the uniqueness of enumeration
> values and bits positions. When used in a union, the conclusion of the
> design team was to add a check in validation tools to generate a warning
> when duplicate values or positions are detected. Such check can be part of
> a validation performed when registering SIDs. Since those values or
> position are not likely to have been used, fixing them won't have any
> impacts on prior implementations. Nobody however have reported so far any
> instances of this issue.
>
>
>
> I don't see any reasons why YANG won't be suitable for binary
> implementations and designers of this modeling language should be proud of
> this accomplishment.
>
>
>
> Regards,
>
> Michel
>
>
>
>
>
> *From:* Andy Bierman [mailto:***@yumaworks.com]
> *Sent:* Saturday, July 22, 2017 12:57 AM
> *To:* Carsten Bormann <***@tzi.org>
> *Cc:* Michel Veillette <***@trilliantinc.com>; Core <
> ***@ietf.org>
> *Subject:* Re: [core] yang cbor encoding without SID
>
>
>
>
>
>
>
> On Fri, Jul 21, 2017 at 2:01 AM, Carsten Bormann <***@tzi.org> wrote:
>
>
> > On Jul 21, 2017, at 10:17, Michel Veillette <
> ***@trilliantinc.com> wrote:
> >
> > Hi Andy
> >
> > About the union, the CBOR encoding avoid any ambiguities between
> datatypes, something not archived by the xml mapping and partially archived
> by JSON. For example, in xml, it is impossible to differentiate the string
> "1" from the integer 1.
>
> I think Andyâs point is that the serialization idiosyncrasies that leak
> into YANG are at this point well-known if it is the idiosyncrasies from the
> XML serialization (which have been maintained quite well in the JSON
> serialization, too) but not so for the CBOR serialization. With some
> effort, it is possible to write YANG that exposes these idiosyncrasies:
>
>
>
>
>
> What I mean is that XML and JSON encodings align with YANG by design.
>
> The YANG identifiers are strings. The value spaces are specified such that
> any
>
> collision is invalid YANG.
>
>
>
> The XML/JSON encoding formats are "protected" by the rules of YANG.
>
> It is not possible for identifier or value space errors to occur if the
> YANG module is valid.
>
> This protection is built into the data modeling language by design for
> numbered
>
> identifiers as well (e.g., SMIv2, Zigbee, etc.)
>
>
>
> But SID is completely unprotected from these errors because the SID
> identifier and
>
> data type encoding can change even though no YANG rules have been violated.
>
> Statement position carries (almost) no semantic or identifier value at all
> in YANG.
>
> Rely on it at your own risk.
>
>
>
>
>
> > The only ambiguities not resolved by the CBOR encoding is an union
> composed of two enumerations defining the same value associated to
> different meanings. I will argue that such definition is incorrect.
>
> Not sure that is the only case, but it still is a case. Right now, the
> YANG tools donât know about these cases yet. So having, say, a pyang
> extension that tests for this might be a useful thing to have.
>
> GrÃŒÃe, Carsten
>
>
>
> Andy
>
>
>
>
>