Cisco Service Layer API Documentation

Interfaces

Service Description

Interface service definitions.

Defines the RPC for getting interface status(es).

RPC Calls

rpc SLInterfaceOper::SLInterfaceGlobalsRegOp (SLInterfaceGlobalsRegMsg) returns(SLInterfaceGlobalsRegMsgRsp)
 Interface Registration Operations. More...
 
rpc SLInterfaceOper::SLInterfaceGlobalsGet (SLInterfaceGlobalsGetMsg) returns(SLInterfaceGlobalsGetMsgRsp)
 Used to retrieve global Interface info from the server.
 
rpc SLInterfaceOper::SLInterfaceGlobalsGetStats (SLInterfaceGlobalsGetMsg) returns(SLInterfaceGlobalsGetStatsMsgRsp)
 Used to retrieve global Interface stats from the server.
 
rpc SLInterfaceOper::SLInterfaceGet (SLInterfaceGetMsg) returns(SLInterfaceGetMsgRsp)
 Retrieve interface attributes and state. More...
 
rpc SLInterfaceOper::SLInterfaceGetNotifStream (SLInterfaceGetNotifMsg) returns(stream SLInterfaceNotif)
 This call is used to get a stream of interface notifications. More...
 
rpc SLInterfaceOper::SLInterfaceNotifOp (SLInterfaceNotifMsg) returns(SLInterfaceNotifMsgRsp)
 Used to enable/disable event notifications for a certain interface. More...
 

Messages

message  SLInterfaceGlobalsRegMsg
 Global Interface Registration Message. More...
 
message  SLInterfaceGlobalsRegMsgRsp
 interface registration response message. More...
 
message  SLInterfaceGlobalsGetMsg
 Global Interface Get message. More...
 
message  SLInterfaceGlobalsGetMsgRsp
 Global interface Get response message. More...
 
message  SLInterfaceGlobalsGetStatsMsgRsp
 Global Interface Get stats message. More...
 
message  SLInterfaceGetMsg
 Interface Get message. More...
 
message  SLInterfaceInfoMsg
 Interface Get Message result. More...
 
message  SLInterfaceGetMsgRsp
 Interface Get Message Response. More...
 
message  SLInterfaceGetNotifMsg
 Interface Get Notification message. More...
 
message  SLInterfaceNotif
 Interface Notification Event. More...
 
message  SLInterfaceNotifMsg
 Interface Notification message. More...
 
message  SLInterfaceNotifMsgRes
 Interface Notification message result. More...
 
message  SLInterfaceNotifMsgRsp
 Interface Notification message response. More...
 

Enumerations

enum  SLInterfaceState { SL_IF_STATE_UNKNOWN = 0, SL_IF_STATE_DOWN = 1, SL_IF_STATE_UP = 2 }
 The current state of the interface. More...
 
enum  SLInterfaceNotifType { SL_INTERFACE_EVENT_TYPE_RESERVED = 0x0, SL_INTERFACE_EVENT_TYPE_ERROR = 0x1, SL_INTERFACE_EVENT_TYPE_INTERFACE_INFO = 0x2 }
 Interface Event Notification types. More...
 

RPC Documentation

rpc SLInterfaceOper::SLInterfaceGet ( SLInterfaceGetMsg  )

Retrieve interface attributes and state.

This call can be used to "poll" the current state of interfaces.

rpc SLInterfaceOper::SLInterfaceGetNotifStream ( SLInterfaceGetNotifMsg  )

This call is used to get a stream of interface notifications.

The caller must maintain the GRPC channel as long as there is interest in interface notifications. This call can be used to get "push" notifications for interface info. It is advised that the caller register for notifications before any interfaces are used to avoid any loss of notifications.

rpc SLInterfaceOper::SLInterfaceGlobalsRegOp ( SLInterfaceGlobalsRegMsg  )

Interface Registration Operations.

This service can be used to receive interface state change notifications.

SLInterfaceGlobalsRegMsg.Oper = SL_REGOP_REGISTER: Global Interface registration. A client Must Register BEFORE interfaces can be modified/queried.

SLInterfaceGlobalsRegMsg.Oper = SL_REGOP_UNREGISTER: Global Interface un-registration. This call is used to end all interface notifications. This call cleans up all interface notifications previously requested.

SLInterfaceGlobalsRegMsg.Oper = SL_REGOP_EOF: Interface End Of File. After Registration, the client is expected to send an EOF message to convey the end of replay of the client's known objects. This is especially useful under certain restart scenarios when the client and the server are trying to synchronize their interfaces.

The SLInterfaceGlobalsRegMsg operations can be used by the client to synchronize interface registrations with the server. When the client re-registers with the server using SL_REGOP_REGISTER, server marks all interface registrations as stale. Client can then reprogram interface registrations. When the client sends SL_REGOP_EOF, any interface registrations not reprogrammed by the client are removed from the device.

The client must perform all operations (SLInterfaceGlobalsRegMsg, interface registration operations) from a single execution context.

rpc SLInterfaceOper::SLInterfaceNotifOp ( SLInterfaceNotifMsg  )

Used to enable/disable event notifications for a certain interface.

By default, all interface events are disabled. The user must enable notifications for the interested interfaces.


Message Documentation

message SLInterfaceGlobalsRegMsg

Global Interface Registration Message.

This message is used for interface global registration. Clients must register before using any interface service.

Attributes

SLRegOp Oper = 1
 Registration Operation.
 
message SLInterfaceGlobalsRegMsgRsp

interface registration response message.

This message is used to convey the result of the interface registration.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
message SLInterfaceGlobalsGetMsg

Global Interface Get message.

This message is used to query interface global capabilities.

message SLInterfaceGlobalsGetMsgRsp

Global interface Get response message.

This message is used to convey the response to the global capabilities query.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
uint32 MaxInterfacesPerBatch = 2
 Max interface objects within a single batch.
 
message SLInterfaceGlobalsGetStatsMsgRsp

Global Interface Get stats message.

This message is used to convey the response to the interface statistics query.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
uint64 SeqNum = 2
 Global Interface event sequence number. More...
 
uint32 InterfaceNotifCount = 3
 Num Interface notification requests added through the service layer.
 

Member Data Documentation

uint64 SLInterfaceGlobalsGetStatsMsgRsp::SeqNum = 2

Global Interface event sequence number.

The sequence number is equivalent to a timestamp

message SLInterfaceGetMsg

Interface Get message.

Attributes

SLInterface Key = 1
 Interface key attributes. More...
 
uint32 EntriesCount = 2
 Number of entries requested.
 
bool GetNext = 3
 if GetNext is FALSE: request up to 'EntriesCount' entries starting from the key If GetNext is TRUE, or if the key exact match is not found: request up to 'EntriesCount' entries starting from the key's next
 

Member Data Documentation

SLInterface SLInterfaceGetMsg::Key = 1

Interface key attributes.

If the Key is not specified, then request up to the first 'EntriesCount' entries.

message SLInterfaceInfoMsg

Interface Get Message result.

Attributes

SLInterface SLIfInfo = 1
 Interface info.
 
SLInterfaceState IfState = 2
 Interface state.
 
uint64 SeqNum = 3
 Global Interface event sequence number. More...
 

Member Data Documentation

uint64 SLInterfaceInfoMsg::SeqNum = 3

Global Interface event sequence number.

The sequence number is equivalent to a timestamp

message SLInterfaceGetMsgRsp

Interface Get Message Response.

Attributes

bool Eof = 1
 End Of File. More...
 
SLErrorStatus ErrStatus = 2
 Status of the Get operation.
 
repeated SLInterfaceInfoMsg Entries = 3
 Returned entries as requested in the Get operation. More...
 

Member Data Documentation

repeated SLInterfaceInfoMsg SLInterfaceGetMsgRsp::Entries = 3

Returned entries as requested in the Get operation.

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLInterfaceGetMsgRsp::Eof = 1

End Of File.

When set to True, it indicates that the server has returned M, where M < N, of the original N requested Entries.

message SLInterfaceGetNotifMsg

Interface Get Notification message.

message SLInterfaceNotif

Interface Notification Event.

Attributes

SLInterfaceNotifType EventType = 1
 Interface Event Notification type.
 
oneof {
   SLErrorStatus   ErrStatus = 2
 case EventType == SL_INTERFACE_EVENT_TYPE_ERROR: => This field carries error info, if any error occurs during notification subscription. More...
 
   SLInterfaceInfoMsg   Info = 3
 case EventType == SL_INTERFACE_EVENT_TYPE_INTERFACE_INFO: => this field carries the session state info
 
}; 
 Further info based on EventType.
 

Member Data Documentation

SLErrorStatus SLInterfaceNotif::ErrStatus = 2

case EventType == SL_INTERFACE_EVENT_TYPE_ERROR: => This field carries error info, if any error occurs during notification subscription.

message SLInterfaceNotifMsg

Interface Notification message.

Attributes

SLNotifOp Oper = 1
 Notification Operation.
 
repeated SLInterface Entries = 2
 Interface key attributes.
 
message SLInterfaceNotifMsgRes

Interface Notification message result.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
SLInterface Key = 2
 Interface key attributes.
 
message SLInterfaceNotifMsgRsp

Interface Notification message response.

Attributes

SLErrorStatus StatusSummary = 1
 Summary result of the bulk operation (refer to enum SLErrorStatus) In general, the StatusSummary implies one of 3 things: More...
 
repeated SLInterfaceNotifMsgRes Results = 2
 In case of errors, this field indicates which entry in the bulk was erroneous. More...
 

Member Data Documentation

repeated SLInterfaceNotifMsgRes SLInterfaceNotifMsgRsp::Results = 2

In case of errors, this field indicates which entry in the bulk was erroneous.

SLErrorStatus SLInterfaceNotifMsgRsp::StatusSummary = 1

Summary result of the bulk operation (refer to enum SLErrorStatus) In general, the StatusSummary implies one of 3 things:

  1. SL_SUCCESS: signifies that the entire bulk operation was successful. In this case, the Results list is empty.
  2. SL_SOME_ERR: signifies that the operation failed for one or more entries. In this case, Results holds the result for each individual entry in the bulk.
  3. SL_RPC_XXX: signifies that the entire bulk operation failed. In this case, the Results list is empty.

Enumeration Type Documentation

Interface Event Notification types.

Enumerator
SL_INTERFACE_EVENT_TYPE_RESERVED 

Reserved. 0x0.

SL_INTERFACE_EVENT_TYPE_ERROR 

Error - ErrStatus field elaborates on the error. 0x1.

SL_INTERFACE_EVENT_TYPE_INTERFACE_INFO 

Interface attributes and state event. 0x2.

The current state of the interface.

Enumerator
SL_IF_STATE_UNKNOWN 

State unknown.

SL_IF_STATE_DOWN 

State Operationally down.

SL_IF_STATE_UP 

State Operationally up.