Package onep :: Package routing :: Module L3UnicastNextHop :: Class L3UnicastNextHop
[frames] | no frames]

Class L3UnicastNextHop


NextHop class represents a next hop of route, and support both IPv4 and IPv6.

Instance Methods
 
__init__(self, network_interface, address, scope=None, error_code=None, metric=None)
Constructor.
 
__str__(self)
Gets the string representation of the object

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

Class Variables
  log = logging.getLogger('onep.'+ __name__)
  NextHopType = enum('DEFAULT', 'REPAIR')
  network_interface = property(_get_network_interface, _set_netw...
  address = property(_get_address, _set_address, None, _doc)
  metric = property(_get_metric, _set_metric, None, _doc)
  route_tag = property(_get_route_tag, _set_route_tag, None, _doc)
Properties

Inherited from NextHop.NextHop: error_code, scope

Inherited from object: __class__

Method Details

__init__(self, network_interface, address, scope=None, error_code=None, metric=None)
(Constructor)

 

Constructor. This constructor can be used for convenience when the Scope is not required, for example, when the route operation is REMOVE.

Parameters:
  • network_interface (NetworkInterface) - The network interface in the next hop to set.
  • address (str) - The address in the next hop to set.
  • scope (L3UnicastScope) - The the next hop scope to set.
Raises:
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

Gets the string representation of the object

Returns:
The string representation of the object.
Overrides: object.__str__

Class Variable Details

network_interface

Value:
property(_get_network_interface, _set_network_interface, None, _doc)