Cisco Service Layer API Documentation

SLRouteIPv4Oper

Service Description

Defines RPC calls for IPv4 route changes and VRF registration.

This service declares both the Vrf Registration, as well as adding, deleting and getting IPv4 routes. All IPv4 addresses are encoded in host byte order.

RPC Calls

rpc SLRoutev4Oper::SLRoutev4GlobalsGet (SLRouteGlobalsGetMsg) returns(SLRouteGlobalsGetMsgRsp)
 Global Route operations. More...
 
rpc SLRoutev4Oper::SLRoutev4GlobalStatsGet (SLRouteGlobalStatsGetMsg) returns(SLRouteGlobalStatsGetMsgRsp)
 Used to retrieve Global Route Stats.
 
rpc SLRoutev4Oper::SLRoutev4VrfRegOp (SLVrfRegMsg) returns(SLVrfRegMsgRsp)
 VRF registration operations. More...
 
rpc SLRoutev4Oper::SLRoutev4VrfRegGet (SLVrfRegGetMsg) returns(SLVrfRegGetMsgRsp)
 VRF get. Used to retrieve VRF attributes from the server.
 
rpc SLRoutev4Oper::SLRoutev4VrfGetStats (SLVrfRegGetMsg) returns(SLVRFGetStatsMsgRsp)
 Used to retrieve VRF Stats from the server.
 
rpc SLRoutev4Oper::SLRoutev4Op (SLRoutev4Msg) returns(SLRoutev4MsgRsp)
 Route operations. More...
 
rpc SLRoutev4Oper::SLRoutev4Get (SLRoutev4GetMsg) returns(SLRoutev4GetMsgRsp)
 Retrieves route attributes.
 
rpc SLRoutev4Oper::SLRoutev4OpStream (stream SLRoutev4Msg) returns(stream SLRoutev4MsgRsp)
 Stream Route operations. More...
 
rpc SLRoutev4Oper::SLRoutev4GetStream (stream SLRoutev4GetMsg) returns(stream SLRoutev4GetMsgRsp)
 Retrieves route attributes.
 
rpc SLRoutev4Oper::SLRoutev4GetNotifStream (stream SLRouteGetNotifMsg) returns(stream SLRoutev4Notif)
 Route Redistribution Operations. More...
 

Messages

message  SLRoutev4
 IPv4 route. More...
 
message  SLRoutev4Msg
 List of routes for bulk download. More...
 
message  SLRoutev4Res
 IPv4 route result, uniquely identified by the Prefix/PrefixLen pair. More...
 
message  SLRoutev4MsgRsp
 IPv4 bulk route result status. More...
 
message  SLRoutev4GetMsg
 Used to retrieve route attributes. More...
 
message  SLRoutev4GetMsgRsp
 Get Route message response. More...
 
message  SLRoutev4NotifRoute
 IPv4 Route notification. More...
 
message  SLRoutev4Notif
 IPv4 notification message. More...
 

RPC Documentation

rpc SLRoutev4Oper::SLRoutev4GetNotifStream ( stream  SLRouteGetNotifMsg)

Route Redistribution Operations.

This call is used to get a stream of route notifications. It can be used to get "push" notifications for route adds/updates/deletes. The caller must maintain the GRPC channel as long as there is interest in route notifications.

The call takes a stream of per-VRF notification requests. The success/failure of the notification request is relayed in the SLRouteNotifStatus followed by a Start marker, any routes if present, and an End Marker.

rpc SLRoutev4Oper::SLRoutev4GlobalsGet ( SLRouteGlobalsGetMsg  )

Global Route operations.

Used to retrieve Global Route information

rpc SLRoutev4Oper::SLRoutev4Op ( SLRoutev4Msg  )

Route operations.

SLRoutev4Msg.Oper = SL_OBJOP_ADD: Route add. Fails if the route already exists and is not stale. First ADD operation on a stale route is treated as implicit update and the route is no longer considered stale.

SLRoutev4Msg.Oper = SL_OBJOP_UPDATE: Route update. Create or update the route. The RPC implements replacement semantics, wherein if the route exists, all its attributes are replaced with values from the new message.

SLRoutev4Msg.Oper = SL_OBJOP_DELETE: Route delete. The route's key is enough to delete the object. Other attributes, if provided are ignored. Delete of a non-existant route is returned as success.

rpc SLRoutev4Oper::SLRoutev4OpStream ( stream  SLRoutev4Msg)

Stream Route operations.

SLRoutev4Msg.Oper = SL_OBJOP_ADD: Route add. Fails if the route already exists and is not stale. First ADD operation on a stale route is treated as implicit update and the route is no longer considered stale.

SLRoutev4Msg.Oper = SL_OBJOP_UPDATE: Route update. Create or update the route. The RPC implements replacement semantics, wherein if the route exists, all its attributes are replaced with values from the new message.

SLRoutev4Msg.Oper = SL_OBJOP_DELETE: Route delete. The route's key is enough to delete the object. Other attributes, if provided are ignored. Delete of a non-existant route is returned as success.

rpc SLRoutev4Oper::SLRoutev4VrfRegOp ( SLVrfRegMsg  )

VRF registration operations.

SLVrfRegMsg.Oper = SL_REGOP_REGISTER: VRF registration: Sends a list of VRF registration messages and expects a list of registration responses. A client Must Register a VRF BEFORE routes can be added/modified in the associated VRF.

SLVrfRegMsg.Oper = SL_REGOP_UNREGISTER: VRF Un-registration: Sends a list of VRF un-registration messages and expects a list of un-registration responses. This can be used to convey that the client is no longer interested in these VRFs. All previously installed routes would be removed.

SLVrfRegMsg.Oper = SL_REGOP_EOF: VRF End Of File message. 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 Routes.

The VRF registration operations can be used by the client to synchronize routes with the device. When the client re-registers the VRF with the server using SL_REGOP_REGISTER, server marks routes as stale. Client then must reprogram routes it is interested in. When client sends SL_REGOP_EOF, any routes not reprogrammed are removed from the device.

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


Message Documentation

message SLRoutev4

IPv4 route.

Attributes

uint32 Prefix = 1
 IPv4 Prefix. More...
 
uint32 PrefixLen = 2
 IPv4 prefix length, [0-32].
 
SLRouteCommon RouteCommon = 3
 Common route attributes.
 
repeated SLRoutePath PathList = 4
 For ADD or UPDATE operation, only one of PathList or SLPathGroupRefKey must be specified. More...
 
oneof {
   SLPathGroupRefKey   PathGroupKey = 5
 Path group reference key.
 
}; 
 Reference to the Path Group for this route. More...
 

Member Data Documentation

oneof { ... }

Reference to the Path Group for this route.

The attribute is oneof to allow for future extension.

repeated SLRoutePath SLRoutev4::PathList = 4

For ADD or UPDATE operation, only one of PathList or SLPathGroupRefKey must be specified.

For DELETE, neither are required. List of route paths for this route. Specifying more than one path is allowed for ECMP/UCMP cases.

uint32 SLRoutev4::Prefix = 1

IPv4 Prefix.

Valid addresses:

  • 0.0.0.0
  • 1.0.0.0 - 223.255.255.255
message SLRoutev4Msg

List of routes for bulk download.

Attributes

SLObjectOp Oper = 1
 Route Object Operations.
 
uint64 Correlator = 2
 Correlator. More...
 
string VrfName = 3
 VRF name.
 
repeated SLRoutev4 Routes = 4
 List of routes for the VRF specified above.
 

Member Data Documentation

uint64 SLRoutev4Msg::Correlator = 2

Correlator.

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

message SLRoutev4Res

IPv4 route result, uniquely identified by the Prefix/PrefixLen pair.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
uint32 Prefix = 2
 IPv4 Prefix.
 
uint32 PrefixLen = 3
 IPv4 prefix length, [0-32].
 
message SLRoutev4MsgRsp

IPv4 bulk route result status.

Attributes

uint64 Correlator = 1
 Correlator. More...
 
string VrfName = 2
 VRF name (matches the VRF name of the original operation)
 
SLErrorStatus StatusSummary = 3
 Summary result of the bulk operation (refer to enum SLErrorStatus) In general, the StatusSummary implies one of 3 things: More...
 
repeated SLRoutev4Res Results = 4
 In case of errors, this field indicates which entry in the bulk was erroneous. More...
 

Member Data Documentation

uint64 SLRoutev4MsgRsp::Correlator = 1

Correlator.

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

repeated SLRoutev4Res SLRoutev4MsgRsp::Results = 4

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

SLErrorStatus SLRoutev4MsgRsp::StatusSummary = 3

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.
message SLRoutev4GetMsg

Used to retrieve route attributes.

Attributes

uint64 Correlator = 1
 Correlator. More...
 
string VrfName = 2
 VRF name. More...
 
uint32 Prefix = 3
 IPv4 Prefix.
 
uint32 PrefixLen = 4
 IPv4 prefix length, [0-32].
 
uint32 EntriesCount = 5
 Number of entries requested.
 
bool GetNext = 6
 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 GetNext does not get the routes in the next client
 

Member Data Documentation

uint64 SLRoutev4GetMsg::Correlator = 1

Correlator.

This can be used to correlate stream replies with requests. The Server simply reflects this field back in the reply.

string SLRoutev4GetMsg::VrfName = 2

VRF name.

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

message SLRoutev4GetMsgRsp

Get Route message response.

Attributes

uint64 Correlator = 1
 Correlator. More...
 
bool Eof = 2
 End Of File. More...
 
string VrfName = 3
 VRF name.
 
SLErrorStatus ErrStatus = 4
 Status of the Get operation.
 
repeated SLRoutev4 Entries = 5
 Returned entries as requested in the Get operation. More...
 

Member Data Documentation

uint64 SLRoutev4GetMsgRsp::Correlator = 1

Correlator.

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

repeated SLRoutev4 SLRoutev4GetMsgRsp::Entries = 5

Returned entries as requested in the Get operation.

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLRoutev4GetMsgRsp::Eof = 2

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 SLRoutev4NotifRoute

IPv4 Route notification.

Attributes

string VrfName = 1
 VRF name.
 
repeated SLRoutev4 Entries = 2
 IPv4 routes.
 
message SLRoutev4Notif

IPv4 notification message.

Attributes

SLNotifType EventType = 1
 Event Type.
 
oneof {
   SLErrorStatus   ErrStatus = 2
 case EventType == SL_EVENT_TYPE_ERROR: => This field carries error info, if any error occurs during notification stream setup. More...
 
   SLRouteNotifStatus   NotifStatus = 3
 case EventType == SL_EVENT_TYPE_STATUS: => This field carries the status of the GetNotifMsg request. More...
 
   SLRoutev4NotifRoute   Route = 4
 case EventType == SL_EVENT_TYPE_ROUTE: => This field carries the v4 route
 
   SLRouteNotifMarker   Marker = 5
 case EventType == SL_EVENT_TYPE_START_MARKER: case EventType == SL_EVENT_TYPE_END_MARKER: => This field carries the start marker and end marker per-VRF. More...
 
   SLVrfNotif   Vrf = 6
 case EventType == SL_EVENT_TYPE_VRF:
 
}; 
 Further info based on EventType.
 

Member Data Documentation

SLErrorStatus SLRoutev4Notif::ErrStatus = 2

case EventType == SL_EVENT_TYPE_ERROR: => This field carries error info, if any error occurs during notification stream setup.

SLRouteNotifMarker SLRoutev4Notif::Marker = 5

case EventType == SL_EVENT_TYPE_START_MARKER: case EventType == SL_EVENT_TYPE_END_MARKER: => This field carries the start marker and end marker per-VRF.

SLRouteNotifStatus SLRoutev4Notif::NotifStatus = 3

case EventType == SL_EVENT_TYPE_STATUS: => This field carries the status of the GetNotifMsg request.