Junos OS cos IDL - Protocol Documentation

Table of Contents

cos_service.proto

Top

Public API for the Junos OS cosd Service

This IDL describes the services, messages, and enumerators available for the cosd API.

CosForwardingClass

Following is the RPC request/response message structure for forwarding classes queried by forwarding class name

RPC Methods:

ForwardClassGet, ForwardClassGetNext, ForwardClassBulkGet

Request message:

Requests must have forwarding_class_name specified for ForwardClassGet requests. For ForwardClassGetNext and ForwardClassBulkGet requests, forwarding_class_name is optional.

Response message:

All the fields of the message will be populated for the requested forwarding class name.

FieldTypeLabelDescription
forwarding_class_name string optional

Forwarding class name

queue_id int32 optional

Forwarding class queue id

restrict_queue_id int32 optional

Forwarding class restricted queue id

forwarding_class_id int32 optional

Forwarding class id

fabric_priority CosFcFabricPriority optional

Forwarding class fabric priority

policing_priority CosFcPolicingPriority optional

Forwarding class policing priority

spu_priority CosFcSpuPriority optional

Forwarding class spu priority

sharable CosBoolean optional

Sharable flag

status CosReturnVal optional

Valid for GET/GETNEXT/BULKGET responses

ref_objects CosObjRefInfo repeated

List of referenced CoS objects - Valid for GET/GETNEXT/BULKGET responses

CosForwardingClassId

Following is the RPC request-response message structure for forwarding classes queried by forwarding class id

RPC Methods:

ForwardClassGetByForwardingClassId

Request message:

By default, forwarding_class_id 0 is used if not specified explicitly.

Response message:

All the fields of the message will be populated for the requested forwarding class id.

FieldTypeLabelDescription
forwarding_class_id int32 optional

Forwarding class id

queue_id int32 optional

Forwarding class queue id

forwarding_class_name string optional

Forwarding class name

restrict_queue_id int32 optional

Forwarding class restricted queue id

fabric_priority CosFcFabricPriority optional

Forwarding class fabric priority

policing_priority CosFcPolicingPriority optional

Forwarding class policing priority

spu_priority CosFcSpuPriority optional

Forwarding class spu priority

sharable CosBoolean optional

Sharable flag

status CosReturnVal optional

Valid for GET response

CosForwardingClassQueue

Following is the RPC request-response message structure for forwarding classes queried by queue id

RPC Methods:

ForwardClassGetByQueueId

Request message:

By default, queue_id 0 is used if not specified explicitly.

Response message:

Response message will have the queue_id and a list of forwarding classes for the requested queue id

FieldTypeLabelDescription
queue_id int32 optional

Forwarding class queue id

forwarding_class_names string repeated

List of forwarding class names

sharable CosBoolean optional

Sharable flag

status CosReturnVal optional

Valid for GET responses

CosForwardingClassRestrictQueue

Following is the RPC request-response message structure for forwarding classes queried by restricted queue id.

RPC Methods:

ForwardClassGetByRestrictQueueId

Request message:

By default, restrict_queue_id 0 is used if not specified explicitly.

Response message:

Response messages contain restricted queue id and a list of forwarding classes for the requested restricted queue id.

FieldTypeLabelDescription
restrict_queue_id int32 optional

Forwarding class restricted queue id

forwarding_class_names string repeated

List of forwarding class names

sharable CosBoolean optional

Sharable flag

status CosReturnVal optional

Valid for GET responses

CosObjRefInfo

Optional reference information for GET/GETNEXT/GETBULK operations for a given CoS object.

FieldTypeLabelDescription
referencing_obj_type string optional

String value indicating the referencing object type.

referencing_obj_name string optional

String value indicating the referencing object name

referencing_obj_count int32 optional

Integer value indicating the number of referencing objects

CosBoolean

Boolean value enumeration

NameNumberDescription
FALSE 0

False boolean value

TRUE 1

True boolean value

CosFcFabricPriority

Forwarding class fabric priority

NameNumberDescription
FAB_LOW 0

Forwarding class fabric low priority

FAB_HIGH 1

Forwardning class fabric high priority

CosFcPolicingPriority

Forwarding class policing priority

NameNumberDescription
NORMAL 0

Normal policing priority

PREMIUM 1

Premium policing priority

CosFcSpuPriority

Forwarding class spu priority

NameNumberDescription
SPU_LOW 0

Low priority

SPU_HIGH 1

High priority

CosReturnVal

Return values for the RPCs These are used with GET/GETBULK requests

NameNumberDescription
EOK 0

Success

INVALID 1

Invalid status

NULL_MESSAGE 2

The RPC result a NULL buffer

EINVALID_MESSAGE 3

Wrong input

EINTERNAL 4

Server Internal error

UNSUPPORTED_OP 5

Operation not supported

NO_RESOURCE 6

Resource not available at server

NO_ENTRY 7

No entry available at server

NO_MORE_ENTRIES 8

No more entries available at server

E_IN_USE 9

Object is in use by other dependents

E_UNSUPP_FEATURE 10

Unsupported feature

Cos

Forwarding class methods queried by forwarding class name

Method NameRequest TypeResponse TypeDescription
ForwardClassGet CosForwardingClass CosForwardingClass

Get the current forwarding class

ForwardClassGetNext CosForwardingClass CosForwardingClass

Get next forwarding class

ForwardClassBulkGet CosForwardingClass CosForwardingClass

Get multiple forwarding class

ForwardClassGetByForwardingClassId CosForwardingClassId CosForwardingClassId

Forwarding class methods queried by forwarding class id

ForwardClassGetByQueueId CosForwardingClassQueue CosForwardingClassQueue

Forwarding class methods queried by forwarding class queue id

ForwardClassGetByRestrictQueueId CosForwardingClassRestrictQueue CosForwardingClassRestrictQueue

Forwarding class methods queried by forwarding class restricted queue id

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