Class AbstractRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- java.lang.Object
-
- org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupport<C,S,R,I>
-
- All Implemented Interfaces:
RIBSupport<C,S,R,I>
- Direct Known Subclasses:
AbstractFlowspecRIBSupport
,AbstractVpnRIBSupport
,L3VpnMcastIpv4RIBSupport
,L3VpnMcastIpv6RIBSupport
,LabeledUnicastIpv4RIBSupport
,LinkstateRIBSupport
,RouteTargetConstrainRIBSupport
@Beta public abstract class AbstractRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>> extends Object implements RIBSupport<C,S,R,I>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.protocol.bgp.rib.spi.RIBSupport
RIBSupport.ApplyRoute
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer
mappingService
static String
ROUTE_KEY
protected org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
routeDefaultYii
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, Class<S> containerClass, Class<R> listClass, Class<? extends AddressFamily> afiClass, Class<? extends SubsequentAddressFamily> safiClass, org.opendaylight.yangtools.yang.common.QName destContainerQname)
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Attributes
attributeFromContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode advertisedAttrs)
Translates supplied YANG Instance Identifier and NormalizedNode into Binding data Attribute.org.opendaylight.yangtools.yang.data.api.schema.ContainerNode
attributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier attPath, Attributes attributes)
Translates supplied Binding Instance Identifier and data into NormalizedNode representation.protected abstract DestinationType
buildDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
Update
buildUpdate(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> advertised, Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> withdrawn, Attributes attr)
To send routes out, we'd need to transform the DOM representation of route to binding-aware format.protected abstract DestinationType
buildWithdrawnDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
Collection<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode>
changedRoutes(org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode routes)
Returns routes that were modified within this RIB support instance.org.opendaylight.yangtools.yang.binding.InstanceIdentifier<R>
createRouteIdentifier(org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Tables,TablesKey> tableIId, I key)
Creates Route table Peer InstanceIdentifier.void
deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri)
Given the NLRI as ContainerNode, this method should extract withdrawn routes from the DOM model and delete them from RIBs.void
deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routesNodeId)
Given the NLRI as ContainerNode, this method should extract withdrawn routes from the DOM model and delete them from RIBs.org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode
emptyTable()
Return the table-type-specific empty table with routes empty container, as augmented into the bgp-rib model under /rib/tables/routes choice node.protected String
extractPrefix(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
protected RouteDistinguisher
extractRouteDistinguisher(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
R
fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
Translates supplied YANG Instance Identifier and NormalizedNode into Binding Route.Class<? extends AddressFamily>
getAfi()
Class<? extends SubsequentAddressFamily>
getSafi()
TablesKey
getTablesKey()
Returns TablesKey which we are providing support.protected org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier
prefixNid()
protected abstract 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 applyFunction)
Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates>
putRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes)
Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates>
putRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routesNodeId)
Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument>
relativeRoutesPath()
Return the relative path from the generic routes container to the AFI/SAFI specific route list.org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier
routeAttributesIdentifier()
Return the localized identifier of the attributes route member, as expanded from the route grouping in the specific augmentation of the base routes choice.protected org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName>
routeKeyTemplate()
protected org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier
routeNid()
protected org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier
routePathIdNid()
org.opendaylight.yangtools.yang.common.QName
routeQName()
Class<C>
routesCaseClass()
Return class object of the Routes Case statement.Class<S>
routesContainerClass()
Return class object of the Routes Container statement.org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier
routesContainerIdentifier()
Return theYangInstanceIdentifier.NodeIdentifier
of the AFI/SAFI-specific container under the RIB routes.Class<R>
routesListClass()
Return class object of the Routes List statement.org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
routesPath(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths)
Constructs an instance identifier path to routes list.protected org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
routesYangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths)
-
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, createRoute, createRouteListKey, createRouteListKey, emptyRoutesContainer, extractAdjRibInRoutes, extractPathId, extractRouteKey, routePath
-
-
-
-
Field Detail
-
ROUTE_KEY
public static final String ROUTE_KEY
- See Also:
- Constant Field Values
-
mappingService
protected final org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService
-
routeDefaultYii
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routeDefaultYii
-
-
Constructor Detail
-
AbstractRIBSupport
protected AbstractRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, Class<S> containerClass, Class<R> listClass, Class<? extends AddressFamily> afiClass, Class<? extends SubsequentAddressFamily> safiClass, org.opendaylight.yangtools.yang.common.QName destContainerQname)
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:
mappingService
- Serialization servicecazeClass
- 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.listClass
- Binding class of the route list, nust not be null;afiClass
- address Family ClasssafiClass
- SubsequentAddressFamilydestContainerQname
- destination Container Qname
-
-
Method Detail
-
getTablesKey
public final TablesKey getTablesKey()
Description copied from interface:RIBSupport
Returns TablesKey which we are providing support.- Specified by:
getTablesKey
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- TablesKey
-
routesCaseClass
public final Class<C> routesCaseClass()
Description copied from interface:RIBSupport
Return class object of the Routes Case statement.- Specified by:
routesCaseClass
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- Class
-
routesContainerClass
public final Class<S> routesContainerClass()
Description copied from interface:RIBSupport
Return class object of the Routes Container statement.- Specified by:
routesContainerClass
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- Class
-
routesListClass
public final Class<R> routesListClass()
Description copied from interface:RIBSupport
Return class object of the Routes List statement.- Specified by:
routesListClass
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- Class
-
emptyTable
public final org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode emptyTable()
Description copied from interface:RIBSupport
Return the table-type-specific empty table with routes empty container, as augmented into the bgp-rib model under /rib/tables/routes choice node. This needs to include all the skeleton nodes under which the individual routes will be stored.- Specified by:
emptyTable
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- Protocol-specific case in the routes choice, may not be null.
-
routeQName
public final org.opendaylight.yangtools.yang.common.QName routeQName()
-
prefixNid
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier prefixNid()
-
routeNid
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routeNid()
-
getAfi
public final Class<? extends AddressFamily> getAfi()
- Specified by:
getAfi
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
-
getSafi
public final Class<? extends SubsequentAddressFamily> getSafi()
- Specified by:
getSafi
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
-
buildDestination
protected abstract DestinationType buildDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
-
buildWithdrawnDestination
protected abstract DestinationType buildWithdrawnDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes)
-
routesContainerIdentifier
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routesContainerIdentifier()
Return theYangInstanceIdentifier.NodeIdentifier
of the AFI/SAFI-specific container under the RIB routes.- Returns:
- Container identifier, may not be null.
-
processDestination
protected abstract 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 applyFunction)
-
routeAttributesIdentifier
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routeAttributesIdentifier()
Description copied from interface:RIBSupport
Return the localized identifier of the attributes route member, as expanded from the route grouping in the specific augmentation of the base routes choice.- Specified by:
routeAttributesIdentifier
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- The attributes identifier, may not be null.
-
changedRoutes
public final Collection<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode> changedRoutes(org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode routes)
Description copied from interface:RIBSupport
Returns routes that were modified within this RIB support instance.- Specified by:
changedRoutes
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
routes
- DataTreeCandidateNode- Returns:
- collection of modified nodes or empty collection if no node was modified
-
routesPath
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths)
Description copied from interface:RIBSupport
Constructs an instance identifier path to routes list.- Specified by:
routesPath
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
routesTablePaths
- YangInstanceIdentifier base path- Returns:
- YangInstanceIdentifier with routesPath + specific RIB support routes path
-
relativeRoutesPath
public final List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> relativeRoutesPath()
Description copied from interface:RIBSupport
Return the relative path from the generic routes container to the AFI/SAFI specific route list.- Specified by:
relativeRoutesPath
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Returns:
- Relative path.
-
createRouteIdentifier
public final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<R> createRouteIdentifier(org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Tables,TablesKey> tableIId, I key)
Description copied from interface:RIBSupport
Creates Route table Peer InstanceIdentifier.- Specified by:
createRouteIdentifier
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
tableIId
- table InstanceIdentifierkey
- route key- Returns:
- InstanceIdentifier
-
buildUpdate
public final Update buildUpdate(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> advertised, Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> withdrawn, Attributes attr)
Description copied from interface:RIBSupport
To send routes out, we'd need to transform the DOM representation of route to binding-aware format. This needs to be done per each AFI/SAFI.- Specified by:
buildUpdate
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
advertised
- Collection of advertised routes in DOM formatwithdrawn
- Collection of withdrawn routes in DOM formatattr
- Attributes MpReach is part of Attributes so we need to pass it as argument, create new AttributesBuilder with existing attributes and add MpReach- Returns:
- Update message ready to be sent out
-
deleteRoutes
public final void deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri)
Description copied from interface:RIBSupport
Given the NLRI as ContainerNode, this method should extract withdrawn routes from the DOM model and delete them from RIBs.- Specified by:
deleteRoutes
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
tx
- DOMDataWriteTransactiontablePath
- YangInstanceIdentifiernlri
- ContainerNode DOM representation of NLRI in Update message
-
deleteRoutes
public final void deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routesNodeId)
Description copied from interface:RIBSupport
Given the NLRI as ContainerNode, this method should extract withdrawn routes from the DOM model and delete them from RIBs.Use this method when removing routes stored in RIBs out of the "bgp-rib" module. Provide
YangInstanceIdentifier.NodeIdentifier
with customized "routes" QName. For default "bgp-rib" RIBs useRIBSupport.deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)
- Specified by:
deleteRoutes
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
tx
- DOMDataWriteTransactiontablePath
- YangInstanceIdentifiernlri
- ContainerNode DOM representation of NLRI in Update messageroutesNodeId
- NodeIdentifier of "routes" data node
-
putRoutes
public final Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> putRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes)
Description copied from interface:RIBSupport
Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.- Specified by:
putRoutes
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
tx
- DOMDataWriteTransactiontablePath
- YangInstanceIdentifiernlri
- ContainerNode DOM representation of NLRI in Update messageattributes
- ContainerNode- Returns:
- List of processed route Identifiers
-
putRoutes
public final Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> putRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routesNodeId)
Description copied from interface:RIBSupport
Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.Use this method when putting routes stored in RIBs out of the "bgp-rib" module. Provide
YangInstanceIdentifier.NodeIdentifier
with customized "routes" QName. For default "bgp-rib" RIBs useRIBSupport.putRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)
- Specified by:
putRoutes
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
tx
- DOMDataWriteTransactiontablePath
- YangInstanceIdentifiernlri
- ContainerNode DOM representation of NLRI in Update messageattributes
- ContainerNoderoutesNodeId
- NodeIdentifier of "routes" data node- Returns:
- List of processed routes identifiers
-
routePathIdNid
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routePathIdNid()
-
routeKeyTemplate
protected final org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName> routeKeyTemplate()
-
extractPrefix
protected final String extractPrefix(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
-
extractRouteDistinguisher
protected final RouteDistinguisher extractRouteDistinguisher(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
-
routesYangInstanceIdentifier
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesYangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths)
-
fromNormalizedNode
public R fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
Description copied from interface:RIBSupport
Translates supplied YANG Instance Identifier and NormalizedNode into Binding Route.- Specified by:
fromNormalizedNode
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
routePath
- Binding Instance IdentifiernormalizedNode
- NormalizedNode representing Route- Returns:
- Route
-
attributeFromContainerNode
public Attributes attributeFromContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode advertisedAttrs)
Description copied from interface:RIBSupport
Translates supplied YANG Instance Identifier and NormalizedNode into Binding data Attribute.- Specified by:
attributeFromContainerNode
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
advertisedAttrs
- NormalizedNode representing attributes- Returns:
- Attribute
-
attributeToContainerNode
public org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier attPath, Attributes attributes)
Description copied from interface:RIBSupport
Translates supplied Binding Instance Identifier and data into NormalizedNode representation.- Specified by:
attributeToContainerNode
in interfaceRIBSupport<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>,R extends Route & org.opendaylight.yangtools.yang.binding.ChildOf<? super S> & org.opendaylight.yangtools.yang.binding.Identifiable<I>,I extends org.opendaylight.yangtools.yang.binding.Identifier<R>>
- Parameters:
attPath
- Binding Instance Identifier pointing to dataattributes
- Data object representing Attributes- Returns:
- NormalizedNode representation
-
-