PROTO encoding

The PROTO encoding mechanism uses the binary encoding format for both path and value to increase the efficiency of telemetry data transfer. The YANG files are encoded in protobuf format, in which every possible path is encoded as a binary index.

The protobuf encoded YANG files are distributed together with the SR OS software or found on http://github.com under Nokia 7X50_protobufs. The PROTO definitions of the YANG model are specifically generated for each software release; backward compatibility is not supported.

To retrieve decoding information for PROTO encoding, the gNMI client can use GetRPC to request a path with origin "gnmi.schemas". The path must be either a root path "gnmi.schemas:/", or a specific path, for example, "gnmi.schemas:/protobuf-typemap", as described in protobuf-vals.md published on github.com (May 2018).

The following example shows the GetRPC request and SR OS response:

Received message of type gnmi.GetRequest:
.type: 0 = ALL
.encoding: 4 = JSON_IETF
.prefix: /
.path (1):
  .path: gnmi.schemas:/
"
Going to send message of type gnmi.GetResponse:
.notification (1):
  .timestamp: 1616677860728392525
  .update (1):
   .path: gnmi.schemas:/protobuf-typemap
   .val.value = json_ietf_val: {
    "gnmi-protobuf-encoding:origin": [
        {
            "name": "",
            "container": [
                {
                    "path": "/",
                    "message-name": "proto.nokia.net/Nokia.SROS.root"
                }
            ]
        }