Ejemplo n.º 1
0
def decode_route_entry(index):
    """Decodes the important bits of an inetCidrRouteTable row index.

    :rtype: CidrRouteEntry

    """
    destination, policy, nexthop = consume(
        index, InetPrefix, ObjectIdentifier, TypedInetAddress)
    return CidrRouteEntry(index, destination, policy, nexthop)
Ejemplo n.º 2
0
 def _bgp_row_to_remote_ip(row_index):
     _routing_instance, _local_addr, remote_addr = consume(
         row_index, Unsigned32, TypedFixedInetAddress,
         TypedFixedInetAddress)
     return remote_addr
Ejemplo n.º 3
0
 def _bgp_row_to_remote_ip(row_index):
     remote_addr, = consume(row_index, TypedInetAddress)
     return remote_addr