Protocol Documentation

Table of Contents

openconfig_service.proto

Top

Public API for the Openconfig Manageabiltiy RPC services.

This IDL defines the APIs for the Openconfig manageabiltiy services.

GetDataEncodingsRequest

FieldTypeLabelDescription
request_id uint64 optional

Identifier sent in request messages

GetDataEncodingsResponse

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

encoding OpenConfigDataEncodingTypes repeated

Specifies the data encoding scheme that is used for data sent to and from the target device

response_code OpenConfigRpcResponseTypes optional

Response code indicating the result of the command

message string optional

Error or information text associated with the return-code value

GetModelsRequest

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

GetModelsResponse

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

model Model repeated

Data associated with requests for information about the data models supported by the device

response_code OpenConfigRpcResponseTypes optional

Response code indicating the result of the command

message string optional

Error or information text associated with the return-code value

GetRequest

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

encoding OpenConfigDataEncodingTypes optional

Identifier for the encoding scheme

get_request GetRequestList repeated

List of paths and associated commands indicating the data to be returned

GetRequestList

FieldTypeLabelDescription
operation_id string optional

Definition of an operation ID. Operation IDs are needed for each individual command in a mult-command RPC.

operation GetDataCommands optional

Command indicates what type of data should be returned from the specified path such as configuration, opstate, etc.

path string optional

Specifies a path in the data model path corresponding to the data in the message

GetResponse

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

response GetResponse.ResponseList repeated

List of responses for each configuration request

GetResponse.ResponseList

FieldTypeLabelDescription
operation_id string optional

The operation id is used to identify a specific configuration command in a multi-command RPC.

The response for each command can be identified based on the operation-id returned by the target device.

path string optional

Specifies a path in the data model path corresponding to the data in the message

value string optional

Data encoded using the encoding specified in set-data-encoding, or the device's default encoding. This data may be populated by the management system when sending configuration data, or by the device when returning configuration, operational state, or telemetry data

response_code OpenConfigRpcResponseTypes optional

Response code indicating the result of the command

message string optional

Error or information text associated with the return-code value

Model

FieldTypeLabelDescription
name string optional

Name of the corresponding YANG module

namespace string optional

Namespace the model belongs to, whether standard or ad-hoc

version string optional

Model version -- for YANG models this should be at least the 'revision' but could also include a more conventional version number

SetDataEncodingRequest

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

encoding OpenConfigDataEncodingTypes optional

Identifier for the encoding scheme

SetDataEncodingResponse

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

response_code OpenConfigRpcResponseTypes optional

Response code indicating the result of the command

message string optional

Error or information text associated with the return-code value

SetRequest

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

transaction bool optional

Indicates whether all individual operations in the RPC request should be treated as a single transaction.

Setting transaction to 'true' means the target device should return a successful response only if all operations are successful. If any one of the operations fails for any reason, the resulting state of the device should be as if none of the operations were applied. Therefore, any successful operations are rolled back.

If set to false, each operation is applied independently and returns its own result.

encoding OpenConfigDataEncodingTypes optional

Identifier for the encoding scheme

config_operation SetRequest.ConfigOperationList repeated

List of configuration data items, each consisting of the data model path and corresponding data encoded based on the requested format

SetRequest.ConfigOperationList

FieldTypeLabelDescription
operation_id string optional

The operation id is used to identify a specific configuration command in a multi-command RPC. The response for each ndividual command can be identified by the operation-id returned by the target device.

operation SetConfigCommands optional

The type of configuration modification requested for the corresponding path. Note that some commands, such as delete do not specify any associated data with the path

path string optional

Specifies a path in the data model path corresponding to the data in the message

value string optional

Data encoded using the encoding specified in set-data-encoding, or the device's default encoding. This data may be populated by the management system when sending configuration data, or by the device when returning configuration, operational state, or telemetry data.

SetResponse

FieldTypeLabelDescription
request_id uint64 optional

The request id corresponding to the request

response SetResponse.ResponseList repeated

List of responses for each configuration request

SetResponse.ResponseList

FieldTypeLabelDescription
operation_id string optional

The operation id is used to identify a specific configuration command in a multi-command RPC. The response for each ndividual command can be identified by the operation-id returned by the target device.

response_code OpenConfigRpcResponseTypes optional

Response code indicating the result of the command

message string optional

Error or information text associated with the return-code value

GetDataCommands

NameNumberDescription
GET_ALL 0

Get all data

GET_CONFIG 1

Get configuration data

GET_OPSTATE 2

Get operational state data

GET_OPER 3

Get operation

OpenConfigDataEncodingTypes

NameNumberDescription
ENCODING_XML 0

XML encoding

ENCODING_JSON 1

JSON encoding

OpenConfigRpcResponseTypes

NameNumberDescription
OK 0

Success

NOK 1

Failure

UNSUPPORTED_PATH 2

Unsupported path specified

INVALID_PATH 3

Invalid path specified

INVALID_CONFIGURATION 4

Invalid configuration specified

UNSUPPORTED_INTERVAL 5

Unsupported interval specified

INVALID_SUBSCRIPTION_ID 6

Invalid subscription ID specified

UNSUPPORTED_ENCODING 7

Unsupported encoding requested

SetConfigCommands

NameNumberDescription
UPDATE_CONFIG 0

Update configuration

REPLACE_CONFIG 1

Replace configuration

DELETE_CONFIG 2

Delete configuration

OpenconfigRpcApi

MGD Service Definitions

Method NameRequest TypeResponse TypeDescription
GetDataEncodings GetDataEncodingsRequest GetDataEncodingsResponse

Return the set of data encodings supported by the device for configuration and telemetry data modeled in YANG

SetDataEncoding SetDataEncodingRequest SetDataEncodingResponse

Select and set one of the data encodings returned by getDataEncodings. This RPC sets the global encoding serialization for all data exchanged with the target device. The global data encoding may be optionally overriden by setting the encoding for an individual RPC if supported by the target

GetModels GetModelsRequest GetModelsResponse

Returns a repeated structure of supported data models

Get GetRequest GetResponse

Requests data from the network device. The Get RPC request should include a subcommand to indicate the type of data desired by the requestor. Supported types of data include:

- configuration data (config: true nodes in the schema)

- operational state data (config: false nodes)

- derived operational state only (config: false nodes that represent derived operational states, exluding config: false nodes that represent applied configuration)

- all data (config: true and config: false nodes)

A get RPC can contain multiple requests for data. Each request includes a path specifying a subtree in the data model and a command to indicate which type of data should be returned.

Set SetRequest SetResponse

Modify configuration on the target device. The Set RPC accepts a combination of commands, each with an associated path specification to indicate what data should be modified.

The commands in a set request should be fully validated and accepted by the device before a response is returned. The application of the configuration commands may or may not be complete when the command returns.

The network management system (NMS) is expected to be able to track the application of the configuration using the operational state data in the telemetry stream, or by retrieving the state data using an RPC

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython 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