Skip to content

Protocol Documentation

Table of Contents

Top

api/types/change/device/types.proto

Change

Change represents a configuration change to a single device

Field Type Label Description
device_id string 'device_id' is the identifier of the device to which this change applies
device_version string 'device_version' is an optional device version to which to apply this change
device_type string 'device_type' is an optional device type to which to apply this change
values ChangeValue repeated 'values' is a set of change values to apply

ChangeValue

ChangeValue is an individual Path/Value and removed flag combination in a Change

Field Type Label Description
path string 'path' is the path to change
value TypedValue 'value' is the change value
removed bool 'removed' indicates whether this is a delete

DeviceChange

DeviceChange is a stored configuration change for a single device

Field Type Label Description
id string 'id' is the unique identifier of the change
index uint64 'index' is a monotonically increasing, globally unique index of the change The index is provided by the store, is static and unique for each unique change identifier, and should not be modified by client code.
revision uint64 'revision' is the change revision number The revision number is provided by the store and should not be modified by client code. Each unique state of the change will be assigned a unique revision number which can be used for optimistic concurrency control when updating or deleting the change state.
network_change NetworkChangeRef 'network_change' is a reference to the NetworkChange that created this change
change Change 'change' is the change object
status onos.config.change.Status 'status' is the lifecycle status of the change
created google.protobuf.Timestamp 'created' is the time at which the change was created
updated google.protobuf.Timestamp 'updated' is the time at which the change was last updated

NetworkChangeRef

NetworkChangeRef is a back reference to the NetworkChange that created a DeviceChange

Field Type Label Description
id string 'id' is the identifier of the network change from which this change was created
index uint64 'index' is the index of the network change from which this change was created

PathValue

PathValue is an individual Path/Value combination - it is like ChangeValue above without the removed flag - it is not used in the DeviceChange store Instead it is useful for handling OpState and Snapshots where removed is not relevant

Field Type Label Description
path string 'path' is the path to change
value TypedValue 'value' is the change value

TypedValue

TypedValue is a value represented as a byte array

Field Type Label Description
bytes bytes 'bytes' is the bytes array
type ValueType 'type' is the value type
type_opts int32 repeated 'type_opts' is a set of type options

ValueType

ValueType is the type for a value

Name Number Description
EMPTY 0
STRING 1
INT 2
UINT 3
BOOL 4
DECIMAL 5
FLOAT 6
BYTES 7
LEAFLIST_STRING 8
LEAFLIST_INT 9
LEAFLIST_UINT 10
LEAFLIST_BOOL 11
LEAFLIST_DECIMAL 12
LEAFLIST_FLOAT 13
LEAFLIST_BYTES 14

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str