Route Constrain policies
[bgpcep.git] / bgp / extensions / route-target / src / main / java / org / opendaylight / protocol / bgp / route / targetcontrain / spi / ClientRouteTargetContrainCache.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.protocol.bgp.route.targetcontrain.spi;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.Route;
12
13 /**
14  * Provide a cache to store client routes advertized, to be used for policy
15  * https://tools.ietf.org/html/rfc4684.
16  * ii.  When advertising an RT membership NLRI to a non-client peer, if
17  * the best path as selected by the path selection procedure
18  * described in Section 9.1 of the base BGP specification [4] is a
19  * route received from a non-client peer, and if there is an
20  * alternative path to the same destination from a client, the
21  * attributes of the client path are advertised to the peer"
22  */
23 public interface ClientRouteTargetContrainCache {
24     /**
25      * Cache Route.
26      *
27      * @param route target constrain
28      */
29     void cacheRoute(Route route);
30
31     /**
32      * Uncache Route.
33      *
34      * @param route target constrain
35      */
36     void uncacheRoute(Route route);
37 }