On Fri, Mar 29, 2019 at 4:19 AM Juergen Schoenwaelder <
[email protected]> wrote:

> Hi,
>
> this is issue is closed but I wonder whether this is correct. I have
> several questions looking at the issue on github:
>
> - Why is this not a YANG issue?
> - Which workaround is better?
> - Why is this tagged as a NETCONF issue?
>
>
Did you mean this should be NETCONF issue?
It is more of a protocol problem then a modeling problem.
The goal is to use the model unaltered.



> If we want to support binary encodings, we need to allow modelers to
> define which types map to a canonical binary representation in
> addition to the canonical string representation. As stated in the
> issue description, hard-wiring some types in the encoding
> specifications is very limited.
>
> In terms of backwards compatibility, this issue should IMHO be tagged
> high (adding binary encoding for some types does not cause any
> backwards compatibility problem since so far we have only strings).
>
>
Not so sure.
The base64 encoding could look like a valid string.
The receiver must know a binary type is being sent (XML and JSON both fail
here, but not CBOR).



> While I do not have a solution proposal, I think this issue is worth
> to look at and we should not close it right now.
>
>
I have a solution proposal, but I have not implemented it yet, so it it not
detailed...

Both sender and receiver need to agree on the binary encoding and how the
data is tagged as binary.

This expired draft should address that problem:
https://tools.ietf.org/html/draft-mahesh-netconf-binary-encoding-01

For every type T that they agree on, there are standard T.b2y() and T.y2b()
conversion functions.
There are also some extensions to define conversion templates so vendors
can add their own types.

The YANG modules do not need to actually be altered.  The peers will
negotiate the
set of types that will be sent as binary when the session starts.
The receiver knows T and the SID for each object, and will accept either
the YANG or binary encoding.



> /js
>
>
Andy


> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod
>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to