YANG models to Protobuf encoding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017 04:34 PM
Does YDK has support for protobuf encoding ? That is given a YANG model, can YDK generate encoders/decoders to send/receive data in protobuf format.
The below link says, its one of the non-standard approaches.
http://events.linuxfoundation.org/sites/events/files/slides/ONS-SDN-metrics-from-SDOs-ward.pdf
I am looking for a way to decode telemetry data that is sent through grpc/protobuf with a given YANG model. That is YANG model -> cpp code -> (protobuf encoding/decoding) <-> grpc (transport)
Thanks,
Hari
- Labels:
-
YANG Development Kit (YDK)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2017 06:07 AM
Hari,
It really depends what kind of protobuf you are looking at here. As you note, there isn't a standard for this as such. We work with a fairly simple protobuf envelope most of the time, with real data nested in the envelope. The nested format has two different formats:
Simple recursive key-value encoding.
"Strongly typed" .proto, based on an underlying YANG model.
You can see some of the IDL we use on XR & NX here:
https://github.com/cisco/bigmuddy-network-telemetry-proto/blob/master/proto_archive/telemetry.proto
In either case, you have a .proto file available for the data, so why not just use that .proto definition?
Cheers,
Einar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2017 03:44 PM
Thanks Einar. As you know, the key-value encoding wont be much useful in production for large and high frequency data sets due to its size.
Strongly typed.proto is preferred for the above case. As far the .proto definition, is there a way to get the definitions for each IOS-XR release (like the yang models) in github ? The bigmuddy-network-telemetry .proto definitions are 7 months old and couldnt figure for which IOS-XR version they are.
- Hari

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2019 10:31 AM
Making proto files part of the YDK model bundle generation could certainly be an interesting enhancement 🤔
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2019 10:21 AM - edited 03-27-2019 10:25 AM
If you are using XR, you can find the protobuf files per version at https://github.com/ios-xr/model-driven-telemetry/tree/master/protos
Hope this helps
-- Santi
