Class IVpnLinkServiceImpl
- java.lang.Object
-
- org.opendaylight.netvirt.vpnmanager.intervpnlink.IVpnLinkServiceImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IVpnLinkService
@Singleton public class IVpnLinkServiceImpl extends java.lang.Object implements IVpnLinkService, java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description IVpnLinkServiceImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idMgr, IBgpManager bgpMgr, IFibManager fibMgr, InterVpnLinkCache interVpnLinkCache, VpnUtil vpnUtil, InterVpnLinkUtil interVpnLinkUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(java.lang.String vpnName, java.lang.String prefix, java.util.List<java.lang.String> nextHopList, org.opendaylight.yangtools.yang.common.Uint32 label, int addOrRemove)
Similar to leakRouteIfNeeded but the only requisite to be met is that there exists an InterVpnLink linking both VPNs.void
leakRoute(InterVpnLinkDataComposite interVpnLink, java.lang.String srcVpnUuid, java.lang.String dstVpnUuid, java.lang.String prefix, org.opendaylight.yangtools.yang.common.Uint32 label, @Nullable RouteOrigin forcedOrigin)
Leaks a route from one VPN to another.void
leakRouteIfNeeded(java.lang.String vpnName, java.lang.String prefix, java.util.List<java.lang.String> nextHopList, org.opendaylight.yangtools.yang.common.Uint32 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()
-
-
-
Constructor Detail
-
IVpnLinkServiceImpl
@Inject public IVpnLinkServiceImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idMgr, IBgpManager bgpMgr, IFibManager fibMgr, InterVpnLinkCache interVpnLinkCache, VpnUtil vpnUtil, InterVpnLinkUtil interVpnLinkUtil)
-
-
Method Detail
-
start
public void start()
-
close
@PreDestroy public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
leakRoute
public void leakRoute(java.lang.String vpnName, java.lang.String prefix, java.util.List<java.lang.String> nextHopList, org.opendaylight.yangtools.yang.common.Uint32 label, int addOrRemove)
Description copied from interface:IVpnLinkService
Similar to leakRouteIfNeeded but the only requisite to be met is that there exists an InterVpnLink linking both VPNs.- Specified by:
leakRoute
in interfaceIVpnLinkService
- Parameters:
vpnName
- 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 withdrawn
-
leakRoute
public void leakRoute(InterVpnLinkDataComposite interVpnLink, java.lang.String srcVpnUuid, java.lang.String dstVpnUuid, java.lang.String prefix, org.opendaylight.yangtools.yang.common.Uint32 label, @Nullable RouteOrigin forcedOrigin)
Description copied from interface:IVpnLinkService
Leaks a route from one VPN to another.- Specified by:
leakRoute
in interfaceIVpnLinkService
- Parameters:
interVpnLink
- 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.
-
leakRouteIfNeeded
public void leakRouteIfNeeded(java.lang.String vpnName, java.lang.String prefix, java.util.List<java.lang.String> nextHopList, org.opendaylight.yangtools.yang.common.Uint32 label, RouteOrigin origin, int addOrRemove)
Description copied from interface:IVpnLinkService
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).- Specified by:
leakRouteIfNeeded
in interfaceIVpnLinkService
- Parameters:
vpnName
- 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 withdrawn
-
exchangeRoutes
public void exchangeRoutes(InterVpnLinkDataComposite ivpnLink)
Description copied from interface:IVpnLinkService
Checks both L3VPNs linked by the InterVpnLink and performs all the corresponding route leaking between them.- Specified by:
exchangeRoutes
in interfaceIVpnLinkService
- Parameters:
ivpnLink
- InterVpnLink to be considered
-
handleStaticRoutes
public void handleStaticRoutes(InterVpnLinkDataComposite ivpnLink)
Description copied from interface:IVpnLinkService
Requests IVpnLinkService to take care of those static routes that point to the specified InterVpnLink and that may be configured in any Neutron Router.- Specified by:
handleStaticRoutes
in interfaceIVpnLinkService
- Parameters:
ivpnLink
- InterVpnLink to be considered.
-
-