Package onep :: Package routing :: Module AppRouteTable :: Class StaticRouteTable
[frames] | no frames]

Class StaticRouteTable


This class represents the static route table. It provides application the ability to add and remove static routes.

Instance Methods
 
__init__(self, parentRSS)
x.__init__(...) initializes x; see help(type(x)) for signature
list of L3UnicastRouteOperation
update_routes(self, scope, opList)
Add or remove static routes
 
get_static_route_list(self)
Return a dictionary of manually configured static routes

Inherited from AppRouteTable: add_replay_route_event_listener, add_route_state_listener, async_update_routes, remove_replay_route_event_listener, remove_route_state_listener

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from AppRouteTable: RouteState, TRIGER_INITIAL_WALK

Properties

Inherited from object: __class__

Method Details

__init__(self, parentRSS)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

update_routes(self, scope, opList)

 

Add or remove static routes

@param scope: Indicate which table in the Static Route Table
to send the route operation too.
@type scope: L{L3UnicastScope<onep.routing.L3UnicastScope>}

@param opList: The list of route operation. If API succeeds,
per route per next hop status are returned and could be accessed 
using Route.error_code and NextHop.eror_code
@type opList: C{list} of 
L{L3UnicastRouteOperation<onep.routing.L3UnicastRouteOperation>}

@return: A dictionary of the route operation which contains a copy of the  
routes in the input parameter, with 'SUCCESS', 'FAIL', or 'NOT_SUPPORTED'
@rtype: dictionary of 
L{L3UnicastRouteOperation<onep.routing.L3UnicastRouteOperation> : 'SUCCESS'}

@raise OnepIllegalArgumentException: This exception is thrown  
if the scope and route are not consistent

@raise OnepConnectionException: The exception is thrown when connection
to the network element has failed. 

@raise OnepRemoteProcedureException: The exception is thrown when an 
error has occurred in the remote procedure call made to a network 
element 

Parameters:
  • scope - Indicate which table in the Application Route Table to send the route operation too.
  • opList - The list of route operation. If API succeeds, per route per next hop status are returned and could be accessed using Route.error_code and NextHop.eror_code
Returns: list of L3UnicastRouteOperation
A list of the route operation. This list is a copy of the routes in the input parameter, with error code for each route added.
Raises:
Overrides: AppRouteTable.update_routes

get_static_route_list(self)

 

Return a dictionary of manually configured static routes

Keys
----
destination -- string - destination IP address
mask        -- int - prefix length
metric      -- int - administrative distance
next_hop    -- string - next hop IP address
interface   -- string - outgoing interface
router      -- string - next hop router