Closed sachinholla closed 2 years ago
@aashaikh, @robshakir -- can you please clarify this? Thanks
By "scalar types", I'm going to guess the authors mean a TypedValue
, https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi.proto#L107, which can also hold JSON (bytes json_val = 10;
).
TogNMINotifications
only supports marshalling to non-JSON TypedValue
types, so perhaps "scalar values" can be interpreted to mean those non-JSON types, but strictly I think the term "scalar value" might be too ambiguous here.
Scalar value refers to the value of an individual leaf so as to disambiguate from a sub-branch with multiple leaves. In a majority of cases, this is the expectation as there are likely cases where the timestamps for multiple leaves in a container are not guaranteed to be the same depending on how they are collected from a given hardware implementation. Aggregation was envisioned only for select circumstances (e.g. where a branch of leaves modeled in OC are actually a single payload at the protocol layer such as an IS-IS LSP).
gNMI spec section 3.5 says telemetry updates should be encoded as (path, scalar value) pairs.
By "scalar value" is it referring to scalar types as explained in section 2.2.3? The very next sentence says "a JSON value if a JSON encoding is utilised"; hence the confusion. The
ygot.TogNMINotifications
utility encodes the updates using scalar types.