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.KeyAware<?>>
- All Implemented Interfaces:
RIBSupport<C,S>
- Direct Known Subclasses:
AbstractFlowspecRIBSupport,AbstractVpnRIBSupport,L3VpnMcastIpv4RIBSupport,L3VpnMcastIpv6RIBSupport,LabeledUnicastIpv4RIBSupport,LinkstateRIBSupport,RouteTargetConstrainRIBSupport
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.protocol.bgp.rib.spi.RIBSupport
RIBSupport.ApplyRoute -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializerstatic final Stringprotected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, org.opendaylight.yangtools.yang.common.QName cazeQName, Class<S> containerClass, org.opendaylight.yangtools.yang.common.QName containerQName, Class<R> listClass, org.opendaylight.yangtools.yang.common.QName listQName, AddressFamily afi, org.opendaylight.yangtools.yang.common.QName afiQName, SubsequentAddressFamily safi, org.opendaylight.yangtools.yang.common.QName safiQName, org.opendaylight.yangtools.yang.common.QName destContainerQname) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionattributeFromContainerNode(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.ContainerNodeattributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier attPath, Attributes attributes) Translates supplied Binding Instance Identifier and data into NormalizedNode representation.protected abstract DestinationTypebuildDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes) final UpdatebuildUpdate(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 DestinationTypebuildWithdrawnDestination(Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> routes) final Collection<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode>changedRoutes(org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode routes) Returns routes that were modified within this RIB support instance.final org.opendaylight.yangtools.yang.data.api.schema.MapEntryNodecreateRoute(org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates key, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes) Creates a route with new path Id and attributes.final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifiercreateRouteIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates newRouteKey) Creates Route table Peer InstanceIdentifier.final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatescreateRouteListArgument(org.opendaylight.yangtools.yang.common.Uint32 pathId, String routeKey) Construct a Route List Key using new path Id for Families.final voiddeleteRoutes(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.final voiddeleteRoutes(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.final org.opendaylight.yangtools.yang.data.api.schema.MapEntryNodeReturn the table-type-specific empty table with routes empty container, as augmented into the bgp-rib model under /rib/tables/routes choice node.final org.opendaylight.yangtools.yang.data.api.schema.ContainerNodeextractAttributes(org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode value) Extract attributes from an route entry.final org.opendaylight.yangtools.yang.common.Uint32extractPathId(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Given a route list key, return the associated path ID.protected final @NonNull StringextractPrefix(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route) protected final @Nullable RouteDistinguisherextractRouteDistinguisher(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route) final StringextractRouteKey(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Given a route list key, return the associated path ID.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.final TablesKeyReturns TablesKey which we are providing support.protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierprotected 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) 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) Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.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) Given the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.final List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument>Return the relative path from the generic routes container to the AFI/SAFI specific route list.final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierReturn the localized identifier of the attributes route member, as expanded from the route grouping in the specific augmentation of the base routes choice.protected final org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName>protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierrouteNid()protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierfinal org.opendaylight.yangtools.yang.common.QNameReturn class object of the Routes Case statement.Return class object of the Routes Container statement.final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierReturn theYangInstanceIdentifier.NodeIdentifierof the AFI/SAFI-specific container under the RIB routes.Return class object of the Routes List statement.final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifierroutesPath(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths) Constructs an instance identifier path to routes list.protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifierroutesYangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesTablePaths) final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.protocol.bgp.rib.spi.RIBSupport
cacheableAttributeObjects, cacheableNlriObjects, createRouteListArgument, routePath, toAddPathListArgument, toNonPathListArgument
-
Field Details
-
ROUTE_KEY
- See Also:
-
mappingService
protected final org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService -
routeDefaultYii
protected final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routeDefaultYii
-
-
Constructor Details
-
AbstractRIBSupport
protected AbstractRIBSupport(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer mappingService, Class<C> cazeClass, org.opendaylight.yangtools.yang.common.QName cazeQName, Class<S> containerClass, org.opendaylight.yangtools.yang.common.QName containerQName, Class<R> listClass, org.opendaylight.yangtools.yang.common.QName listQName, AddressFamily afi, org.opendaylight.yangtools.yang.common.QName afiQName, SubsequentAddressFamily safi, org.opendaylight.yangtools.yang.common.QName safiQName, 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;afi- Address Familysafi- Subsequent Address FamilydestContainerQname- destination Container Qname
-
-
Method Details
-
getTablesKey
Description copied from interface:RIBSupportReturns TablesKey which we are providing support.- Specified by:
getTablesKeyin 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>> - Returns:
- TablesKey
-
tablesKey
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates tablesKey() -
routesCaseClass
Description copied from interface:RIBSupportReturn class object of the Routes Case statement.- Specified by:
routesCaseClassin 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>> - Returns:
- Class
-
routesContainerClass
Description copied from interface:RIBSupportReturn class object of the Routes Container statement.- Specified by:
routesContainerClassin 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>> - Returns:
- Class
-
routesListClass
Description copied from interface:RIBSupportReturn class object of the Routes List statement.- Specified by:
routesListClassin 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>> - Returns:
- Class
-
emptyTable
public final org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode emptyTable()Description copied from interface:RIBSupportReturn 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:
emptyTablein 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>> - 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() -
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.NodeIdentifierof 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:RIBSupportReturn 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:
routeAttributesIdentifierin 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>> - Returns:
- The attributes identifier, may not be null.
-
changedRoutes
public final Collection<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode> changedRoutes(org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode routes) Description copied from interface:RIBSupportReturns routes that were modified within this RIB support instance.- Specified by:
changedRoutesin 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>> - 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:RIBSupportConstructs an instance identifier path to routes list.- Specified by:
routesPathin 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>> - 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:RIBSupportReturn the relative path from the generic routes container to the AFI/SAFI specific route list.- Specified by:
relativeRoutesPathin 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>> - Returns:
- Relative path.
-
createRouteIdentifier
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier createRouteIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates newRouteKey) Description copied from interface:RIBSupportCreates Route table Peer InstanceIdentifier.- Specified by:
createRouteIdentifierin 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>> - Parameters:
tablePath- table InstanceIdentifiernewRouteKey- route key- Returns:
- InstanceIdentifier
-
createRoute
public final org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode createRoute(org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates key, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes) Description copied from interface:RIBSupportCreates a route with new path Id and attributes.- Specified by:
createRoutein 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>> - Parameters:
route- routekey- route keyattributes- route attributes- Returns:
- Route List key
-
createRouteListArgument
public final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates createRouteListArgument(org.opendaylight.yangtools.yang.common.Uint32 pathId, String routeKey) Description copied from interface:RIBSupportConstruct a Route List Key using new path Id for Families.- Specified by:
createRouteListArgumentin 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>> - Parameters:
pathId- The path identifierrouteKey- RouteKey- Returns:
- route list Key (RouteKey + pathId)
-
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:RIBSupportGiven the NLRI as ContainerNode, this method should extract withdrawn routes from the DOM model and delete them from RIBs.- Specified by:
deleteRoutesin 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>> - 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:RIBSupportGiven 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.NodeIdentifierwith 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:
deleteRoutesin 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>> - 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:RIBSupportGiven the NLRI as ContainerNode, this method should extract advertised routes from the DOM model and put them into RIBs.- Specified by:
putRoutesin 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>> - 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:RIBSupportGiven 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.NodeIdentifierwith 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:
putRoutesin 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>> - Parameters:
tx- DOMDataWriteTransactiontablePath- YangInstanceIdentifiernlri- ContainerNode DOM representation of NLRI in Update messageattributes- ContainerNoderoutesNodeId- NodeIdentifier of "routes" data node- Returns:
- List of processed routes identifiers
-
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:RIBSupportTo 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:
buildUpdatein 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>> - 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
-
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 @NonNull String extractPrefix(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route) -
extractRouteDistinguisher
protected final @Nullable RouteDistinguisher extractRouteDistinguisher(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode 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:RIBSupportTranslates supplied YANG Instance Identifier and NormalizedNode into Binding Route.- Specified by:
fromNormalizedNodein 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>> - 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:RIBSupportTranslates supplied YANG Instance Identifier and NormalizedNode into Binding data Attribute.- Specified by:
attributeFromContainerNodein 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>> - 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:RIBSupportTranslates supplied Binding Instance Identifier and data into NormalizedNode representation.- Specified by:
attributeToContainerNodein 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>> - Parameters:
attPath- Binding Instance Identifier pointing to dataattributes- Data object representing Attributes- Returns:
- NormalizedNode representation
-
extractRouteKey
public final String extractRouteKey(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Description copied from interface:RIBSupportGiven a route list key, return the associated path ID.- Specified by:
extractRouteKeyin 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>> - Parameters:
routeListKey- Route list key- Returns:
- RouteKey
-
extractPathId
public final org.opendaylight.yangtools.yang.common.Uint32 extractPathId(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Description copied from interface:RIBSupportGiven a route list key, return the associated path ID.- Specified by:
extractPathIdin 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>> - Parameters:
routeListKey- Route list key- Returns:
- Path ID
-
extractAttributes
public final org.opendaylight.yangtools.yang.data.api.schema.ContainerNode extractAttributes(org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode value) Description copied from interface:RIBSupportExtract attributes from an route entry.- Specified by:
extractAttributesin 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>> - Parameters:
value- Route entry- Returns:
- Associated attributes, potentially null
-