Junos OS registration IDL - Protocol Documentation

Table of Contents

registration_service.proto

Top

This is the Junos OS registration protocol API.

This API is used to register client application services with the target device.

RegisterReply

The response message containing success or failure of the service registration request. A result value of true indicates success and false indicates failure. In case of failure, the error attribute indicates the reason for failure.

FieldTypeLabelDescription
result bool optional

Result of the service registration request

error string optional

Error message string indicating the reason for failure.

RegisterRequest

The request message containing the service registration info

FieldTypeLabelDescription
json_input string optional

JSON string from the file emitted using protoc-thrift compiler. {THIS MENTIONS THRIFT. IS THAT CORRECT?}

file_input string optional

Absolute file path on the router containing json input

target string optional

Target ip-address or unix domain socket for this service. For example:

IPv6 address format is "[::]:50051"

IPv4 address format is "0.0.0.0:50051"

unix domain socket format is "unix:/tmp/test_socket"

register_id string optional

Registration ID which is used as the filename to store the APIs registered in /opt/lib.proto/<register-id>.json

JSD will read the contents of this file upon restart. When the daemon re-registers the APIs, it needs to use the same register ID. This will allow JSD to delete the old file and store the new contents in that file.

skip_authentication bool optional

Boolean variable to indicate if JSD should skip LoginCheck() call for RPCs executed for this package from clients that are connected using a secure channel.

Register

The service registration definition.

Method NameRequest TypeResponse TypeDescription
RegisterService RegisterRequest RegisterReply

Registration service methods

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