Management Service API
mgd_service.proto
Public API for the Manageabiltiy RPC services.
This IDL defines the APIs for the Junos specific management services.
ConfigCommit
Request configuration commit message structure
Field | Type | Label | Description |
---|---|---|---|
commit_type | ConfigCommitType | optional | This will specify the type of commit operation. Commit operation can be commit or commit-synchronize |
comment | string | optional | Specify the comment for the commit log |
EditEphemeralConfigRequest
Message structure for edit ephemeral configuration requests
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
eph_config_operations | EditEphemeralConfigRequest.ConfigOperationList | repeated | List of configuration data items, each consisting of the data model path and corresponding data encoded based on the requested format |
eph_instance_name | string | optional | EphInstanceName: Empty for the default ephemeral instance or the name of the ephemeral instance for dynamic instance |
EditEphemeralConfigRequest.ConfigOperationList
List of configuration operations to be performed
Field | Type | Label | Description |
---|---|---|---|
operation_id | string | optional | The operation id is used to identify a specific configuration command when the RPC contains multiple commands. The response for each command can be identified based on the operation-id returned by the target device |
operation | ConfigCommands | 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 |
xml_config | string | optional | Config in XML format |
json_config | string | optional | Config in JSON format |
EditEphemeralConfigResponse
Message structure for responses from edit ephemeral configuration requests
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
response | EditEphemeralConfigResponse.ResponseList | repeated | List of responses for each configuration request |
EditEphemeralConfigResponse.ResponseList
List of responses
Field | Type | Label | Description |
---|---|---|---|
operation_id | string | optional | The operation id is used to identify a specific configuration command when the RPC contains multiple commands. The response for each command can be identified based on the operation-id returned by the target device |
status | JunosRpcResponseTypes | optional | Response code indicating the result of the command |
message | string | optional | Error or information text associated with the return-code value |
EphConfigRequestList
Message structure for ephemeral database configuration request lists
Field | Type | Label | Description |
---|---|---|---|
operation_id | string | optional | Identifier for the request |
path | string | optional | Data model path to retrieve |
ExecuteCfgCommandRequest
Request Configuration Command Execution
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
xml_config | string | optional | Configuration data in XML format |
json_config | string | optional | Configuration data in JSON format |
text_config | string | optional | Configuration data in text format |
load_type | ConfigLoadType | optional | Specify the type of load operation |
commit | ConfigCommit | optional | Specify the type of commit operation |
ExecuteCfgCommandResponse
Configuration command response
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
status | JunosRpcResponseTypes | optional | Response code indicating the result of the command |
message | string | optional | Error or information text associated with the return-code value |
ExecuteOpCommandRequest
Message structure for executing operational mode commands
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
cli_command | string | optional | Command formatted in cli (set) format |
xml_command | string | optional | Command formatted in XML format |
json_command | string | optional | Command formatted in json format |
out_format | OperationFormatType | optional | Output format, default is JSON |
ExecuteOpCommandResponse
Message structure for responses returned from executing operational commands
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
data | string | optional | Command Data |
status | JunosRpcResponseTypes | optional | Response code indicating the result of the command |
message | string | optional | Error or information text associated with the return-code value |
GetEphemeralConfigRequest
Message structure for get ephemeral configuration requests
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
encoding | JunosDataEncodingTypes | optional | Identifier for the encoding scheme |
eph_config_requests | EphConfigRequestList | repeated | List of configuration requests EphConfigRequest will contain the Path |
eph_instance_name | string | optional | EphInstanceName: Empty for default ephemeral instance or the name of the ephemeral instance for dynamic instance |
merge_view | bool | optional | MergeView: Set to true if merge view configuration needed |
GetEphemeralConfigResponse
Message structure for responses from get ephemeral configuration requests
Field | Type | Label | Description |
---|---|---|---|
request_id | uint64 | optional | The request id corresponding to the request |
response | GetEphemeralConfigResponse.ResponseList | repeated | List of responses for each configuration request |
GetEphemeralConfigResponse.ResponseList
List of responses
Field | Type | Label | Description |
---|---|---|---|
operation_id | string | optional | The operation id is used to identify a specific configuration command when the RPC contains multiple commands. |
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 encoding specified in the request. This data may be populated by the management system. |
status | JunosRpcResponseTypes | optional | Response code indicating the result of the command |
message | string | optional | Error or information text associated with the return-code value |
ConfigCommands
List of configuration commands
Name | Number | Description |
---|---|---|
UPDATE_CONFIG | 0 | Update configuration |
REPLACE_CONFIG | 1 | Replace configuration |
DELETE_CONFIG | 2 | Delete configuration |
ConfigCommitType
List of available configuration commit types
Name | Number | Description |
---|---|---|
CONFIG_COMMIT_SYNCHRONIZE | 0 | Commit synchronize |
CONFIG_COMMIT | 1 | Commit |
ConfigLoadType
List of configuration load options
Name | Number | Description |
---|---|---|
CONFIG_LOAD_REPLACE | 0 | Config load replace - Load configuration statements from client as replacement for existing configuration |
CONFIG_LOAD_MERGE | 1 | Config load merge - Load configuration statements from client so as to merge with existing configuration |
CONFIG_LOAD_OVERRIDE | 2 | Config load override - Load configuration statements from client as an override to existing configuration |
CONFIG_LOAD_UPDATE | 3 | Config load update - Load configuration statements from client as an update to existing configuration |
CONFIG_LOAD_SET | 4 | Config load set - Load configuration from commands sent from client in set form. |
JunosDataEncodingTypes
List of supported data encoding types
Name | Number | Description |
---|---|---|
ENCODING_XML | 0 | XML encoding |
ENCODING_JSON | 1 | JSON encoding |
JunosRpcResponseTypes
List of possible RPC responses
Name | Number | Description |
---|---|---|
SUCCESS | 0 | Success |
NOK | 1 | Error |
UNSUPPORTED_PATH | 2 | Unsupported path |
INVALID_PATH | 3 | Invalid path |
INVALID_CONFIGURATION | 4 | Invalid configuration |
UNSUPPORTED_ENCODING | 5 | Unsupported encoding |
OperationFormatType
Name | Number | Description |
---|---|---|
OPERATION_FORMAT_JSON | 0 | JSON format (Default) |
OPERATION_FORMAT_XML | 1 | |
OPERATION_FORMAT_CLI | 2 |
ManagementRpcApi
MGD Service Definitions
Method Name | Request Type | Response Type | Description |
---|---|---|---|
ExecuteOpCommand | ExecuteOpCommandRequest | ExecuteOpCommandResponse | It executes the operational command specified in ExecuteOpCommandRequest. This is a streaming API |
ExecuteCfgCommand | ExecuteCfgCommandRequest | ExecuteCfgCommandResponse | The RPC will enable user to load and commit configuration on a Junos OS device |
GetEphemeralConfig | GetEphemeralConfigRequest | GetEphemeralConfigResponse | This RPC will return the configuration in the ephemeral database for Path specified in the request |
EditEphemeralConfig | EditEphemeralConfigRequest | EditEphemeralConfigResponse | This RPC will perform load-configuration and commit in JUNOS in ephemeral database |