Skip to content

Protocol Documentation

Table of Contents

Top

onos/config/admin/admin.proto

GetConfigurationRequest

Field Type Label Description
configuration_id string

GetConfigurationResponse

Field Type Label Description
configuration onos.config.v2.Configuration

GetTransactionRequest

Field Type Label Description
id string ID of transaction to get
index uint64 index of transaction to get; leave 0 for lookup by ID; if specified takes precedence

GetTransactionResponse

Field Type Label Description
transaction onos.config.v2.Transaction

ListConfigurationsRequest

ListConfigurationsResponse

Field Type Label Description
configuration onos.config.v2.Configuration

ListModelsRequest

ListModelsRequest carries data for querying registered model plugins.

Field Type Label Description
verbose bool verbose option causes all of the ReadWrite and ReadOnly paths to be included.
model_name string An optional filter on the name of the model plugins to list.
model_version string An optional filter on the version of the model plugins to list

ListTransactionsRequest

ListTransactionsResponse

Field Type Label Description
transaction onos.config.v2.Transaction

ModelInfo

ModelInfo is general information about a model plugin.

Field Type Label Description
name string name is the name given to the model plugin - no spaces and title case.
version string version is the semantic version of the Plugin e.g. 1.0.0.
model_data gnmi.ModelData repeated model_data is a set of metadata about the YANG files that went in to generating the model plugin. It includes name, version and organization for each YANG file, similar to how they are represented in gNMI Capabilities.
module string module is the name of the Model Plugin on the file system - usually ending in .so.<version>.
getStateMode uint32 getStateMode is flag that defines how the "get state" operation works. 0) means that no retrieval of state is attempted 1) means that the synchronizer will make 2 requests to the device - one for Get with State and another for Get with Operational. 2) means that the synchronizer will do a Get request comprising of each one of the ReadOnlyPaths and their sub paths. If there is a list in any one of these paths it will be sent down as is, expecting the devices implementation of gNMI will be able to expand wildcards. 3) means that the synchronizer will do a Get request comprising of each one of the ReadOnlyPaths and their sub paths. If there is a list in any one of these paths, a separate call will be made first to find all the instances in the list and a Get including these expanded wildcards will be sent down to the device.
read_only_path ReadOnlyPath repeated read_only_path is all of the read only paths for the model plugin.
read_write_path ReadWritePath repeated read_write_path is all of the read write paths for the model plugin.
supported_encodings gnmi.Encoding repeated

ModelInfoRequest

ModelInfoRequest carries request for the model information

ModelInfoResponse

ModelInfoResponse carries response for the model information query

Field Type Label Description
modelInfo ModelInfo

ModelPlugin

Field Type Label Description
id string
endpoint string
info ModelInfo
status string
error string

PathValuesRequest

PathValuesRequest carries configuration change as a JSON blob

Field Type Label Description
pathPrefix string
json bytes

PathValuesResponse

PathValuesResponse carries a list of typed path values

Field Type Label Description
pathValues onos.config.v2.PathValue repeated

ReadOnlyPath

ReadOnlyPath extracted from the model plugin as the definition of a tree of read only items. In YANG models items are defined as ReadOnly with the config false keyword. This can be applied to single items (leafs) or collections (containers or lists). When this config false is applied to an object every item beneath it will also become readonly - here these are shown as subpaths. The complete read only path then will be a concatenation of both e.g. /cont1a/cont1b-state/list2b/index and the type is defined in the SubPath as UInt8.

Field Type Label Description
path string path of the topmost config false object e.g. /cont1a/cont1b-state
sub_path ReadOnlySubPath repeated ReadOnlySubPath is a set of children of the path including an entry for the type of the topmost object with subpath / An example is /list2b/index

ReadOnlySubPath

ReadOnlySubPath is an extension to the ReadOnlyPath to define the datatype of the subpath

Field Type Label Description
sub_path string sub_path is the relative path of a child object e.g. /list2b/index
value_type onos.config.v2.ValueType value_type is the datatype of the read only path
type_opts uint64 repeated
description string
units string
IsAKey bool
AttrName string

ReadWritePath

ReadWritePath is extracted from the model plugin as the definition of a writeable attributes. In YANG models items are writable by default unless they are specified as config false or have an item with config false as a parent. Each configurable item has metadata with meanings taken from the YANG specification RFC 6020.

Field Type Label Description
path string path is the full path to the attribute (leaf or leaf-list)
value_type onos.config.v2.ValueType value_type is the data type of the attribute
units string units is the unit of measurement e.g. dB, mV
description string description is an explaination of the meaning of the attribute
mandatory bool mandatory shows whether the attribute is optional (false) or required (true)
default string default is a default value used with optional attributes
range string repeated range is definition of the range of values a value is allowed
length string repeated length is a defintion of the length restrictions for the attribute
type_opts uint64 repeated
IsAKey bool
AttrName string

RollbackRequest

RollbackRequest carries the index of the configuration change transaction to rollback.

Field Type Label Description
index uint64 index of the transaction that should be rolled back

RollbackResponse

RollbackResponse carries the response of the rollback operation

Field Type Label Description
id string ID of the rollback transaction
index uint64 index of the rollback transaction

ValidateConfigRequest

ValidateConfigRequest carries configuration data to be validated as a JSON blob

Field Type Label Description
json bytes

ValidateConfigResponse

ValidateConfigResponse carries the result of the validation

Field Type Label Description
valid bool
message string

WatchConfigurationsRequest

Field Type Label Description
configuration_id string
noreplay bool

WatchConfigurationsResponse

Field Type Label Description
event onos.config.v2.ConfigurationEvent

WatchTransactionsRequest

Field Type Label Description
id string
noreplay bool

WatchTransactionsResponse

Field Type Label Description
event onos.config.v2.TransactionEvent

ConfigAdminService

ConfigAdminService provides means for enhanced interactions with the configuration subsystem.

Method Name Request Type Response Type Description
ListRegisteredModels ListModelsRequest ModelPlugin stream ListRegisteredModels returns a stream of registered models.
RollbackTransaction RollbackRequest RollbackResponse RollbackTransaction rolls back the specified configuration change transaction.

ConfigurationService

ConfigurationService provides means to inspect the contents of the internal configurations store.

Method Name Request Type Response Type Description
GetConfiguration GetConfigurationRequest GetConfigurationResponse Get configuration by its target ID
ListConfigurations ListConfigurationsRequest ListConfigurationsResponse stream List returns all target configurations
WatchConfigurations WatchConfigurationsRequest WatchConfigurationsResponse stream Watch returns a stream of configuration change notifications

ModelPluginService

ModelPluginService is to be implemented by model plugin sidecar

Method Name Request Type Response Type Description
GetModelInfo ModelInfoRequest ModelInfoResponse GetModelInfo provides information about the model
ValidateConfig ValidateConfigRequest ValidateConfigResponse ValidateConfig validates the provided configuration data against the model
GetPathValues PathValuesRequest PathValuesResponse GetPathValues produces list of typed path value entries from the specified configuration change JSON tree

TransactionService

TransactionService provides means to inspect the contents of the internal transactions store.

Method Name Request Type Response Type Description
GetTransaction GetTransactionRequest GetTransactionResponse Get transaction by its ID or index
ListTransactions ListTransactionsRequest ListTransactionsResponse stream List returns all configuration transactions
WatchTransactions WatchTransactionsRequest WatchTransactionsResponse stream Watch returns a stream of configuration transaction change notifications

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 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 int32 int integer Bignum or Fixnum (as required)
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 int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)