telemetry

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

cisco-xr-telemetry-proto

Cisco IOS-XR telemetry proto files and Go implementation.

The proto files are retrieved from: https://github.com/ios-xr/model-driven-telemetry

The current (available) telemetry.proto is for IOS-XR version 7.4.3 (and newer).

Find the documentation here: https://pkg.go.dev/github.com/INSRapperswil/cisco-xr-telemetry-proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_telemetry_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Telemetry

type Telemetry struct {

	//
	// node_id_str is a string encoded unique node ID of the MDT-capable
	// device producing the message. (node_id_uuid alternative is not currently
	// produced in IOS-XR)
	//
	// Types that are assignable to NodeId:
	//	*Telemetry_NodeIdStr
	NodeId isTelemetry_NodeId `protobuf_oneof:"node_id"`
	//
	// subscription_id_str is the name of the subscription against which
	// this content is being produced. (subscription_id alternative is not
	//  currently produced in IOS-XR)
	//
	// Types that are assignable to Subscription:
	//	*Telemetry_SubscriptionIdStr
	Subscription isTelemetry_Subscription `protobuf_oneof:"subscription"`
	//
	// sensor_path is not currently produced in IOS-XR
	// string   sensor_path = 5;
	//
	// encoding_path is the Yang path leading to the content in this message.
	// The Yang tree encoded in the content section of this message is rooted
	// at the point described by the encoding_path.
	EncodingPath string `protobuf:"bytes,6,opt,name=encoding_path,json=encodingPath,proto3" json:"encoding_path,omitempty"`
	//
	// model_revision
	ModelVersion string `protobuf:"bytes,7,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"`
	//
	// collection_id identifies messages belonging to a collection round.
	// Multiple message may be generated from a collection round.
	CollectionId uint64 `protobuf:"varint,8,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	//
	// collection_start_time is the time when the collection identified by
	// the collection_id begins - encoded as milliseconds since the epoch.
	// If a single collection is spread over multiple Telemetry Messages,
	// collection_start_time may be encoded in the first Telemetry Message
	// for the collection only.
	CollectionStartTime uint64 `protobuf:"varint,9,opt,name=collection_start_time,json=collectionStartTime,proto3" json:"collection_start_time,omitempty"`
	//
	// msg_timestamp is the time when the data encoded in the Telemetry
	// message is generated - encoded as milliseconds since the epoch.
	MsgTimestamp uint64 `protobuf:"varint,10,opt,name=msg_timestamp,json=msgTimestamp,proto3" json:"msg_timestamp,omitempty"`
	//
	// data_gpbkv contains the payload data if data is being encoded in the
	// self-describing GPB-KV format.
	DataGpbkv []*TelemetryField `protobuf:"bytes,11,rep,name=data_gpbkv,json=dataGpbkv,proto3" json:"data_gpbkv,omitempty"`
	//
	// data_gpb contains the payload data if data is being encoded as
	// serialised GPB messages.
	DataGpb *TelemetryGPBTable `protobuf:"bytes,12,opt,name=data_gpb,json=dataGpb,proto3" json:"data_gpb,omitempty"`
	//
	// collection_end_time is the timestamp when the last Telemetry message
	// for a collection has been encoded - encoded as milliseconds since the
	// epoch. If a single collection is spread over multiple Telemetry
	// messages, collection_end_time is encoded in the last Telemetry Message
	// for the collection only.
	CollectionEndTime uint64 `protobuf:"varint,13,opt,name=collection_end_time,json=collectionEndTime,proto3" json:"collection_end_time,omitempty"`
	// contains filtered or unexported fields
}

Telemetry message is the outermost payload message used to stream telemetry in a Model Driven Telemetry (MDT) system. MDT provides a mechanism for an external entity to subscribe to a data set defined in a Yang model and receive periodic or event-based updates of the data set from an MDT-capable device.

func (*Telemetry) Descriptor deprecated

func (*Telemetry) Descriptor() ([]byte, []int)

Deprecated: Use Telemetry.ProtoReflect.Descriptor instead.

func (*Telemetry) GetCollectionEndTime

func (x *Telemetry) GetCollectionEndTime() uint64

func (*Telemetry) GetCollectionId

func (x *Telemetry) GetCollectionId() uint64

func (*Telemetry) GetCollectionStartTime

func (x *Telemetry) GetCollectionStartTime() uint64

func (*Telemetry) GetDataGpb

func (x *Telemetry) GetDataGpb() *TelemetryGPBTable

func (*Telemetry) GetDataGpbkv

func (x *Telemetry) GetDataGpbkv() []*TelemetryField

func (*Telemetry) GetEncodingPath

func (x *Telemetry) GetEncodingPath() string

func (*Telemetry) GetModelVersion

func (x *Telemetry) GetModelVersion() string

func (*Telemetry) GetMsgTimestamp

func (x *Telemetry) GetMsgTimestamp() uint64

func (*Telemetry) GetNodeId

func (m *Telemetry) GetNodeId() isTelemetry_NodeId

func (*Telemetry) GetNodeIdStr

func (x *Telemetry) GetNodeIdStr() string

func (*Telemetry) GetSubscription

func (m *Telemetry) GetSubscription() isTelemetry_Subscription

func (*Telemetry) GetSubscriptionIdStr

func (x *Telemetry) GetSubscriptionIdStr() string

func (*Telemetry) ProtoMessage

func (*Telemetry) ProtoMessage()

func (*Telemetry) ProtoReflect

func (x *Telemetry) ProtoReflect() protoreflect.Message

func (*Telemetry) Reset

func (x *Telemetry) Reset()

func (*Telemetry) String

func (x *Telemetry) String() string

type TelemetryField

type TelemetryField struct {

	//
	// timestamp represents the starting time of the generation of data
	// starting from this key, value pair in this message - encoded as
	// milliseconds since the epoch. It is encoded when different from the
	// msg_timestamp in the containing Telemetry Message. This field can be
	// omitted if the value is the same as a TelemetryField message up the
	// hierarchy within the same Telemetry Message as well.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	//
	// name: string encoding of the name in the key, value pair. It is
	// the corresponding YANG element name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	//
	// value_by_type, if present, for the corresponding YANG element
	// represented by the name field in the same TelemetryField message. The
	// value is encoded to the matching type as defined in the YANG model.
	// YANG models often define new types (derived types) using one or more
	// base types.  The types included in the oneof grouping is sufficient to
	// represent such derived types. Derived types represented as a Yang
	// container are encoded using the nesting primitive defined in this
	// encoding proposal.
	//
	// Types that are assignable to ValueByType:
	//	*TelemetryField_BytesValue
	//	*TelemetryField_StringValue
	//	*TelemetryField_BoolValue
	//	*TelemetryField_Uint32Value
	//	*TelemetryField_Uint64Value
	//	*TelemetryField_Sint32Value
	//	*TelemetryField_Sint64Value
	//	*TelemetryField_DoubleValue
	//	*TelemetryField_FloatValue
	ValueByType isTelemetryField_ValueByType `protobuf_oneof:"value_by_type"`
	//
	// The Yang model may include nesting (e.g hierarchy of containers). The
	// next level of nesting, if present, is encoded, starting from fields.
	Fields []*TelemetryField `protobuf:"bytes,15,rep,name=fields,proto3" json:"fields,omitempty"`
	// set only for delete event
	Delete bool `protobuf:"varint,16,opt,name=delete,proto3" json:"delete,omitempty"`
	// contains filtered or unexported fields
}

TelemetryField messages are used to export content in the self describing GPB KV form. The TelemetryField message is sufficient to decode telemetry messages for all models. KV-GPB encoding is very similar in concept, to JSON encoding

func (*TelemetryField) Descriptor deprecated

func (*TelemetryField) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryField.ProtoReflect.Descriptor instead.

func (*TelemetryField) GetBoolValue

func (x *TelemetryField) GetBoolValue() bool

func (*TelemetryField) GetBytesValue

func (x *TelemetryField) GetBytesValue() []byte

func (*TelemetryField) GetDelete

func (x *TelemetryField) GetDelete() bool

func (*TelemetryField) GetDoubleValue

func (x *TelemetryField) GetDoubleValue() float64

func (*TelemetryField) GetFields

func (x *TelemetryField) GetFields() []*TelemetryField

func (*TelemetryField) GetFloatValue

func (x *TelemetryField) GetFloatValue() float32

func (*TelemetryField) GetName

func (x *TelemetryField) GetName() string

func (*TelemetryField) GetSint32Value

func (x *TelemetryField) GetSint32Value() int32

func (*TelemetryField) GetSint64Value

func (x *TelemetryField) GetSint64Value() int64

func (*TelemetryField) GetStringValue

func (x *TelemetryField) GetStringValue() string

func (*TelemetryField) GetTimestamp

func (x *TelemetryField) GetTimestamp() uint64

func (*TelemetryField) GetUint32Value

func (x *TelemetryField) GetUint32Value() uint32

func (*TelemetryField) GetUint64Value

func (x *TelemetryField) GetUint64Value() uint64

func (*TelemetryField) GetValueByType

func (m *TelemetryField) GetValueByType() isTelemetryField_ValueByType

func (*TelemetryField) ProtoMessage

func (*TelemetryField) ProtoMessage()

func (*TelemetryField) ProtoReflect

func (x *TelemetryField) ProtoReflect() protoreflect.Message

func (*TelemetryField) Reset

func (x *TelemetryField) Reset()

func (*TelemetryField) String

func (x *TelemetryField) String() string

type TelemetryField_BoolValue

type TelemetryField_BoolValue struct {
	BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type TelemetryField_BytesValue

type TelemetryField_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,4,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type TelemetryField_DoubleValue

type TelemetryField_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,11,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type TelemetryField_FloatValue

type TelemetryField_FloatValue struct {
	FloatValue float32 `protobuf:"fixed32,12,opt,name=float_value,json=floatValue,proto3,oneof"`
}

type TelemetryField_Sint32Value

type TelemetryField_Sint32Value struct {
	Sint32Value int32 `protobuf:"zigzag32,9,opt,name=sint32_value,json=sint32Value,proto3,oneof"`
}

type TelemetryField_Sint64Value

type TelemetryField_Sint64Value struct {
	Sint64Value int64 `protobuf:"zigzag64,10,opt,name=sint64_value,json=sint64Value,proto3,oneof"`
}

type TelemetryField_StringValue

type TelemetryField_StringValue struct {
	StringValue string `protobuf:"bytes,5,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type TelemetryField_Uint32Value

type TelemetryField_Uint32Value struct {
	Uint32Value uint32 `protobuf:"varint,7,opt,name=uint32_value,json=uint32Value,proto3,oneof"`
}

type TelemetryField_Uint64Value

type TelemetryField_Uint64Value struct {
	Uint64Value uint64 `protobuf:"varint,8,opt,name=uint64_value,json=uint64Value,proto3,oneof"`
}

type TelemetryGPBTable

type TelemetryGPBTable struct {
	Row []*TelemetryRowGPB `protobuf:"bytes,1,rep,name=row,proto3" json:"row,omitempty"`
	// contains filtered or unexported fields
}

TelemetryGPBTable contains a repeated number of TelemetryRowGPB, each of which represents content from a subtree instance in the the YANG model. For example; a TelemetryGPBTable might contain the interface statistics of a collection of interfaces.

func (*TelemetryGPBTable) Descriptor deprecated

func (*TelemetryGPBTable) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryGPBTable.ProtoReflect.Descriptor instead.

func (*TelemetryGPBTable) GetRow

func (x *TelemetryGPBTable) GetRow() []*TelemetryRowGPB

func (*TelemetryGPBTable) ProtoMessage

func (*TelemetryGPBTable) ProtoMessage()

func (*TelemetryGPBTable) ProtoReflect

func (x *TelemetryGPBTable) ProtoReflect() protoreflect.Message

func (*TelemetryGPBTable) Reset

func (x *TelemetryGPBTable) Reset()

func (*TelemetryGPBTable) String

func (x *TelemetryGPBTable) String() string

type TelemetryRowGPB

type TelemetryRowGPB struct {

	//
	// timestamp at which the data for this instance of the TelemetryRowGPB
	// message was generated by an MDT-capable device - encoded as
	// milliseconds since the epoch.  When included, this is typically
	// different from the msg_timestamp in the containing Telemetry message.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	//
	// keys: if the encoding-path includes one or more list elements, and/or
	// ends in a list element, the keys field is a GPB encoded message that
	// contains the sequence of key values for each such list element in the
	// encoding-path traversed starting from the root.  The set of keys
	// unambiguously identifies the instance of data encoded in the
	// TelemetryRowGPB message. Corresponding protobuf message definition will
	// be required to decode the byte stream. The encoding_path field in
	// Telemetry message, together with model_version field should be
	// sufficient to identify the corresponding protobuf message.
	Keys []byte `protobuf:"bytes,10,opt,name=keys,proto3" json:"keys,omitempty"`
	//
	// content: the content field is a GPB encoded message that contains the
	// data for the corresponding encoding-path. A separate decoding pass
	// would be performed by consumer with the content field as a GPB message
	// and the matching .proto used to decode the message. Corresponding
	// protobuf message definition will be required to decode the byte
	// stream. The encoding_path field in Telemetry message, together with
	// model_version field should be sufficient to identify the corresponding
	// protobuf message. The decoded combination of keys (when present) and
	// content, unambiguously represents an instance of the data set, as
	// defined in the Yang model, identified by the encoding-path in the
	// containing Telemetry message.
	Content []byte `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

TelemetryRowGPB, in conjunction with the Telemetry encoding_path and model_version, unambiguously represents the root of a subtree in the YANG model, and content from that subtree encoded in serialised GPB messages. For example; a TelemetryRowGPB might contain the interface statistics of one interface. Per encoding-path .proto messages are required to decode keys/content pairs below.

func (*TelemetryRowGPB) Descriptor deprecated

func (*TelemetryRowGPB) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryRowGPB.ProtoReflect.Descriptor instead.

func (*TelemetryRowGPB) GetContent

func (x *TelemetryRowGPB) GetContent() []byte

func (*TelemetryRowGPB) GetKeys

func (x *TelemetryRowGPB) GetKeys() []byte

func (*TelemetryRowGPB) GetTimestamp

func (x *TelemetryRowGPB) GetTimestamp() uint64

func (*TelemetryRowGPB) ProtoMessage

func (*TelemetryRowGPB) ProtoMessage()

func (*TelemetryRowGPB) ProtoReflect

func (x *TelemetryRowGPB) ProtoReflect() protoreflect.Message

func (*TelemetryRowGPB) Reset

func (x *TelemetryRowGPB) Reset()

func (*TelemetryRowGPB) String

func (x *TelemetryRowGPB) String() string

type Telemetry_NodeIdStr

type Telemetry_NodeIdStr struct {
	NodeIdStr string `protobuf:"bytes,1,opt,name=node_id_str,json=nodeIdStr,proto3,oneof"` // bytes node_id_uuid = 2;
}

type Telemetry_SubscriptionIdStr

type Telemetry_SubscriptionIdStr struct {
	SubscriptionIdStr string `protobuf:"bytes,3,opt,name=subscription_id_str,json=subscriptionIdStr,proto3,oneof"` // uint32   subscription_id = 4;
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL