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)
def _bgp_row_to_remote_ip(row_index): _routing_instance, _local_addr, remote_addr = consume( row_index, Unsigned32, TypedFixedInetAddress, TypedFixedInetAddress) return remote_addr
def _bgp_row_to_remote_ip(row_index): remote_addr, = consume(row_index, TypedInetAddress) return remote_addr