netconf-wg / netconf-next

A repository to collection feature requests for NETCONF
0 stars 1 forks source link

Flexible Message Encoding #30

Open abierman opened 11 months ago

abierman commented 11 months ago

Flexible Encoding of NETCONF Messages

YANG/CBOR

There is a need to support YANG/CBOR encoding for NETCONF messages RFC 9254

SID Files

SID draft-23

JSON

There is a need to support JSON encoding for NETCONF messages RFC 7951

Flexible Message Encoding

The protocol needs some changes to support multiple encoding formats, including CBOR. An extensible mechanism is needed to allow for future encoding besides XML, JSON, and CBOR. Many use-cases exist for XML, JSON, and/or CBOR encoding for specific messages:

NETCONF needs a much-simplified version of the HTTP Content-Type and Accept headers.

Protocol Non-Changes

Hello Exchange Changes

The hello message will need to updated to allow both peers to agree on "base:1.2". If so then the new enhanced message format is used (TBD).

Message Layer Changes

Somehow the client needs to opt-in for a different message encoding than XML

JSON Attributes

Some NETCONF request messages and data responses use XML attributes. The JSON support in RFC 7951) is too stateful to be usable, It is possible there are no implementations of the JSON attributes in RFC 7951. Perhaps a simplified (forced order) can help entice developers to implement it.

CBOR attributes

CBOR does not support attributes at all. The work is TBD. It is still suitable for notification messages now, but this CBOR work is needed for full XML message replacement.

Previous Work

There was a previous attempt at this feature in 2018

NETCONF Binary Encoding