Protocol Documentation
Table of Contents
Top
onos/config/admin/admin.proto
GetConfigurationRequest
Field | Type | Label | Description |
configuration_id | string | | |
GetConfigurationResponse
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
LeafSelectionQueryRequest
LeafSelectionQueryRequest carries request for the selection of leaf values
Field | Type | Label | Description |
target | string | | target is the name of the target (device) to perform the query on |
type | string | | type of model plugin to perform the query on |
version | string | | version of model plugin to perform the query on |
selectionPath | string | | selectionPath is a configuration path to a leaf in the format: /a/b[key1=index][key2=index2]/c/d where d is a leaf node |
changeContext | gnmi.SetRequest | | changeContext is the set of changes (e.g. from the GUI form) that have to be superimposed on the current configuration before the leaf selection can be made All the changes in this request should match the target given above optional |
LeafSelectionQueryResponse
LeafSelectionQueryResponse carries response for the model information query
Field | Type | Label | Description |
selection | string | repeated | selection is an array of string values |
ListConfigurationsRequest
ListConfigurationsResponse
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
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 | | Deprecated. module is no longer used |
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 | |
namespace_mappings | Namespace | repeated | namespace_mappings is a set of all prefix to module name mapping in the model |
southboundUsePrefix | bool | | southboundUsePrefix indicates that the southbound should add prefixes in gNMI paths |
ModelInfoRequest
ModelInfoRequest carries request for the model information
ModelInfoResponse
ModelInfoResponse carries response for the model information query
Field | Type | Label | Description |
modelInfo | ModelInfo | | |
ModelPlugin
Namespace
Namespace is a mapping between a module name and its shorthand prefix
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
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
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 | | Deprecated. default is a default value used with optional attributes. Replaced by 'defaults' below |
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 | | |
defaults | string | repeated | defaults is a default value(s) used with optional attributes. For leaf-list can have repeated values replaces the 'default' attribute above |
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 |
ValidateConfigChunkRequest
ValidateConfigRequest carries configuration data to be validated as a JSON blob
Field | Type | Label | Description |
json | bytes | | |
ValidateConfigRequest
ValidateConfigRequest carries configuration data to be validated as a JSON blob
Field | Type | Label | Description |
json | bytes | | |
ValidateConfigRequestChunk
ValidateConfigRequestChunk carries configuration data to be validated as a JSON blob Recommended maximum size is 100kB
Field | Type | Label | Description |
json | bytes | | |
ValidateConfigResponse
ValidateConfigResponse carries the result of the validation
Field | Type | Label | Description |
valid | bool | | |
message | string | | |
ValueSelectionRequest
ValueSelectionRequest carries the necessary parts to form a selection context
Field | Type | Label | Description |
selectionPath | string | | selectionPath is a configuration path to a leaf in the format: /a/b[key1=index][key2=index2]/c/d where d is a leaf node |
configJson | bytes | | configJson is a JSON tree view of the complete Configuration for a Target |
ValueSelectionRequestChunk
ValueSelectionRequestChunk carries the necessary parts to form a selection context Recommended maximum size is 100kB
Field | Type | Label | Description |
selectionPath | string | | selectionPath is a configuration path to a leaf in the format: /a/b[key1=index][key2=index2]/c/d where d is a leaf node |
configJson | bytes | | configJson is a JSON tree view of the complete Configuration for a Target |
ValueSelectionResponse
ValueSelectionResponse returns the result of applying the selection rules to the selection context
Field | Type | Label | Description |
selection | string | repeated | selection is an array of string values |
WatchConfigurationsRequest
Field | Type | Label | Description |
configuration_id | string | | |
noreplay | bool | | |
WatchConfigurationsResponse
WatchTransactionsRequest
Field | Type | Label | Description |
id | string | | |
noreplay | bool | | |
WatchTransactionsResponse
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. |
LeafSelectionQuery | LeafSelectionQueryRequest | LeafSelectionQueryResponse | LeafSelectionQuery selects values allowable for leaf. It supports the ROC GUI by supplying a list of valid leaf values based off an XPath query defined in a 'leaf-selection' YANG extension Calls on GetValueSelection RPC on Model Plugin |
ConfigurationService
ConfigurationService provides means to inspect the contents of the internal configurations store.
ModelPluginService
ModelPluginService is to be implemented by model plugin sidecar
TransactionService
TransactionService provides means to inspect the contents of the internal transactions store.
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) |