Class AbstractVpnRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C> & L3vpnIpRoute>
- java.lang.Object
-
- org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupport<C,S,VpnRoute,VpnRouteKey>
-
- org.opendaylight.protocol.bgp.l3vpn.unicast.AbstractVpnRIBSupport<C,S>
-
- All Implemented Interfaces:
RIBSupport<C,S,VpnRoute,VpnRouteKey>
- Direct Known Subclasses:
VpnIpv4RIBSupport
,VpnIpv6RIBSupport
public abstract class AbstractVpnRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C> & L3vpnIpRoute> extends AbstractRIBSupport<C,S,VpnRoute,VpnRouteKey>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.protocol.bgp.rib.spi.RIBSupport
RIBSupport.ApplyRoute
-
-
Field Summary
-
Fields inherited from class org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupport
mappingService, ROUTE_KEY, routeDefaultYii
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractVpnRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, Class<S> containerClass, Class<? extends AddressFamily> afiClass, org.opendaylight.yangtools.yang.common.QName vpnDstContainerClassQname)
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected DestinationType
buildDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
protected DestinationType
buildWithdrawnDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
protected abstract org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix
createPrefix(String prefix)
VpnRoute
createRoute(VpnRoute route, VpnRouteKey key, Attributes attributes)
Creates a route with new path Id and attributes.VpnRouteKey
createRouteListKey(PathId pathId, String vpnRouteKey)
Construct a Route List Key using new path Id for Families.PathId
extractPathId(VpnRouteKey routeListKey)
Given a route list key, return the associated path ID.String
extractRouteKey(VpnRouteKey routeListKey)
Given a route list key, return the associated path ID.protected abstract DestinationType
getAdvertisedDestinationType(List<VpnDestination> dests)
protected abstract DestinationType
getWithdrawnDestinationType(List<VpnDestination> dests)
protected Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates>
processDestination(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode destination, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, RIBSupport.ApplyRoute function)
-
Methods inherited from class org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupport
attributeFromContainerNode, attributeToContainerNode, buildUpdate, changedRoutes, createRouteIdentifier, deleteRoutes, deleteRoutes, emptyTable, extractPrefix, extractRouteDistinguisher, fromNormalizedNode, getAfi, getSafi, getTablesKey, prefixNid, putRoutes, putRoutes, relativeRoutesPath, routeAttributesIdentifier, routeKeyTemplate, routeNid, routePathIdNid, routeQName, routesCaseClass, routesContainerClass, routesContainerIdentifier, routesListClass, routesPath, routesYangInstanceIdentifier
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.protocol.bgp.rib.spi.RIBSupport
cacheableAttributeObjects, cacheableNlriObjects, createRouteListKey, emptyRoutesContainer, extractAdjRibInRoutes, routePath
-
-
-
-
Constructor Detail
-
AbstractVpnRIBSupport
protected AbstractVpnRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, Class<S> containerClass, Class<? extends AddressFamily> afiClass, org.opendaylight.yangtools.yang.common.QName vpnDstContainerClassQname)
Default constructor. Requires the QName of the container augmented under the routes choice node in instantiations of the rib grouping. It is assumed that this container is defined by the same model which populates it with route grouping instantiation, and by extension with the route attributes container.- Parameters:
cazeClass
- Binding class of the AFI/SAFI-specific case statement, must not be nullcontainerClass
- Binding class of the container in routes choice, must not be null.
-
-
Method Detail
-
createPrefix
protected abstract org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix createPrefix(String prefix)
-
getAdvertisedDestinationType
protected abstract DestinationType getAdvertisedDestinationType(List<VpnDestination> dests)
-
getWithdrawnDestinationType
protected abstract DestinationType getWithdrawnDestinationType(List<VpnDestination> dests)
-
buildDestination
protected DestinationType buildDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
- Specified by:
buildDestination
in classAbstractRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C> & L3vpnIpRoute,VpnRoute,VpnRouteKey>
-
buildWithdrawnDestination
protected DestinationType buildWithdrawnDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
- Specified by:
buildWithdrawnDestination
in classAbstractRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C> & L3vpnIpRoute,VpnRoute,VpnRouteKey>
-
processDestination
protected Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> processDestination(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode destination, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, RIBSupport.ApplyRoute function)
- Specified by:
processDestination
in classAbstractRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C> & L3vpnIpRoute,VpnRoute,VpnRouteKey>
-
createRoute
public final VpnRoute createRoute(VpnRoute route, VpnRouteKey key, Attributes attributes)
Description copied from interface:RIBSupport
Creates a route with new path Id and attributes.- Parameters:
route
- routekey
- route keyattributes
- route attributes- Returns:
- Route List key
-
createRouteListKey
public VpnRouteKey createRouteListKey(PathId pathId, String vpnRouteKey)
Description copied from interface:RIBSupport
Construct a Route List Key using new path Id for Families.- Parameters:
pathId
- The path identifiervpnRouteKey
- RouteKey- Returns:
- route list Key (RouteKey + pathId)
-
extractPathId
public PathId extractPathId(VpnRouteKey routeListKey)
Description copied from interface:RIBSupport
Given a route list key, return the associated path ID.- Parameters:
routeListKey
- Route list key- Returns:
- Path ID
-
extractRouteKey
public final String extractRouteKey(VpnRouteKey routeListKey)
Description copied from interface:RIBSupport
Given a route list key, return the associated path ID.- Parameters:
routeListKey
- Route list key- Returns:
- RouteKey
-
-