@Singleton public class IVpnLinkServiceImpl extends Object implements IVpnLinkService, AutoCloseable
| Constructor and Description |
|---|
IVpnLinkServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idMgr,
IBgpManager bgpMgr,
IFibManager fibMgr,
InterVpnLinkCache interVpnLinkCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
exchangeRoutes(InterVpnLinkDataComposite ivpnLink)
Checks both L3VPNs linked by the InterVpnLink and performs all the
corresponding route leaking between them.
|
void |
handleStaticRoutes(InterVpnLinkDataComposite ivpnLink)
Requests IVpnLinkService to take care of those static routes that point
to the specified InterVpnLink and that may be configured in any Neutron
Router.
|
void |
leakRoute(InterVpnLinkDataComposite interVpnLink,
String srcVpnUuid,
String dstVpnUuid,
String prefix,
Long label,
RouteOrigin forcedOrigin)
Leaks a route from one VPN to another.
|
void |
leakRoute(String vpnName,
String prefix,
List<String> nextHopList,
int label,
int addOrRemove)
Similar to leakRouteIfNeeded but the only requisite to be met is that
there exists an InterVpnLink linking both VPNs.
|
void |
leakRouteIfNeeded(String vpnName,
String prefix,
List<String> nextHopList,
int label,
RouteOrigin origin,
int addOrRemove)
Leaks a route belonging to a L3VPN to other L3VPN if the necessary
circumstances are met, like there is an InterVpnLink linking both L3VPNs
and the corresponding leaking flag is active (bgp/static/connected).
|
void |
start() |
@Inject
public IVpnLinkServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idMgr,
IBgpManager bgpMgr,
IFibManager fibMgr,
InterVpnLinkCache interVpnLinkCache)
@PostConstruct public void start()
@PreDestroy public void close()
close in interface AutoCloseablepublic void leakRoute(String vpnName, String prefix, List<String> nextHopList, int label, int addOrRemove)
IVpnLinkServiceleakRoute in interface IVpnLinkServicevpnName - Vpn name of the L3VPN that holds the original routeprefix - Prefix/destination of the routenextHopList - List of nexthops (ECMP) of the routelabel - Label of the route to be leakedaddOrRemove - states if the routes must be leaked or withdrawnpublic void leakRoute(InterVpnLinkDataComposite interVpnLink, String srcVpnUuid, String dstVpnUuid, String prefix, Long label, RouteOrigin forcedOrigin)
IVpnLinkServiceleakRoute in interface IVpnLinkServiceinterVpnLink - Reference to the object that holds the info about the link between the 2 VPNssrcVpnUuid - UUID of the VPN that has the route that is going to be leaked to the other VPNdstVpnUuid - UUID of the VPN that is going to receive the routeprefix - Prefix of the routelabel - Label of the route in the original VPNforcedOrigin - By default, origin for leaked routes is INTERVPN, however it is possible to
provide a different origin if desired.public void leakRouteIfNeeded(String vpnName, String prefix, List<String> nextHopList, int label, RouteOrigin origin, int addOrRemove)
IVpnLinkServiceleakRouteIfNeeded in interface IVpnLinkServicevpnName - Vpn name of the L3VPN that holds the original routeprefix - Prefix/destination of the routenextHopList - List of nexthops (ECMP) of the routelabel - Label of the route to be leakedorigin - Origin of the route (BGP|STATIC|CONNECTED)addOrRemove - states if the routes must be leaked or withdrawnpublic void exchangeRoutes(InterVpnLinkDataComposite ivpnLink)
IVpnLinkServiceexchangeRoutes in interface IVpnLinkServiceivpnLink - InterVpnLink to be consideredpublic void handleStaticRoutes(InterVpnLinkDataComposite ivpnLink)
IVpnLinkServicehandleStaticRoutes in interface IVpnLinkServiceivpnLink - InterVpnLink to be considered.Copyright © 2019 OpenDaylight. All rights reserved.