Interface RIBSupport<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
- All Known Implementing Classes:
AbstractFlowspecL3vpnRIBSupport,AbstractFlowspecRIBSupport,AbstractRIBSupport,AbstractVpnRIBSupport,FlowspecIpv4RIBSupport,FlowspecIpv6RIBSupport,FlowspecL3vpnIpv4RIBSupport,FlowspecL3vpnIpv6RIBSupport,L3VpnMcastIpv4RIBSupport,L3VpnMcastIpv6RIBSupport,LabeledUnicastIpv4RIBSupport,LinkstateRIBSupport,RouteTargetConstrainRIBSupport,VpnIpv4RIBSupport,VpnIpv6RIBSupport
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@NonNull AttributesattributeFromContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode advertisedAttrs) Translates supplied YANG Instance Identifier and NormalizedNode into Binding data Attribute.@NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNodeattributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath, Attributes attributes) Translates supplied Binding Instance Identifier and data into NormalizedNode representation.@NonNull UpdatebuildUpdate(@NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> advertised, @NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> withdrawn, @NonNull Attributes attr) To send routes out, we'd need to transform the DOM representation of route to binding-aware format.default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.binding.BindingObject>> default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.binding.BindingObject>> @NonNull Collection<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode> changedRoutes(@NonNull org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode routes) Returns routes that were modified within this RIB support instance.@NonNull org.opendaylight.yangtools.yang.data.api.schema.MapEntryNodecreateRoute(@Nullable org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates key, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes) Creates a route with new path Id and attributes.@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifiercreateRouteIdentifier(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates newRouteKey) Creates Route table Peer InstanceIdentifier.default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatescreateRouteListArgument(@NonNull String routeKey) Construct a Route List Key.@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatescreateRouteListArgument(@NonNull org.opendaylight.yangtools.yang.common.Uint32 pathId, @NonNull String routeKey) Construct a Route List Key using new path Id for Families.voiddeleteRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull 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.voiddeleteRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull 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.@NonNull 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.@Nullable org.opendaylight.yangtools.yang.data.api.schema.ContainerNodeextractAttributes(@NonNull org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Extract attributes from an route entry.@NonNull org.opendaylight.yangtools.yang.common.Uint32extractPathId(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Given a route list key, return the associated path ID.@NonNull StringextractRouteKey(@NonNull 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 routerId, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode normalizedNode) Translates supplied YANG Instance Identifier and NormalizedNode into Binding Route.@NonNull TablesKeyReturns TablesKey which we are providing support.Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> putRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull 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(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, @NonNull 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.@NonNull 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.@NonNull 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.default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifierroutePath(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument routeId) Constructs an instance identifier path to routeId.Return class object of the Routes Case statement.Return class object of the Routes Container statement.Return class object of the Routes List statement.@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifierroutesPath(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath) Constructs an instance identifier path to routes list.@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatesdefault @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatestoAddPathListArgument(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicatestoNonPathListArgument(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey)
-
Method Details
-
emptyTable
@NonNull 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. This needs to include all the skeleton nodes under which the individual routes will be stored.- Returns:
- Protocol-specific case in the routes choice, may not be null.
-
routeAttributesIdentifier
@NonNull 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.- Returns:
- The attributes identifier, may not be null.
-
routesCaseClass
Return class object of the Routes Case statement.- Returns:
- Class
-
routesContainerClass
Return class object of the Routes Container statement.- Returns:
- Class
-
routesListClass
Return class object of the Routes List statement.- Returns:
- Class
-
cacheableAttributeObjects
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.binding.BindingObject>> cacheableAttributeObjects() -
cacheableNlriObjects
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.binding.BindingObject>> cacheableNlriObjects() -
deleteRoutes
void deleteRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull 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.- Parameters:
tx- DOMDataWriteTransactiontablePath- YangInstanceIdentifiernlri- ContainerNode DOM representation of NLRI in Update message
-
deleteRoutes
void deleteRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull 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.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 usedeleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)- Parameters:
tx- DOMDataWriteTransactiontablePath- YangInstanceIdentifiernlri- ContainerNode DOM representation of NLRI in Update messageroutesNodeId- NodeIdentifier of "routes" data node
-
putRoutes
Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> putRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull 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.- Parameters:
tx- DOMDataWriteTransactiontablePath- YangInstanceIdentifiernlri- ContainerNode DOM representation of NLRI in Update messageattributes- ContainerNode- Returns:
- List of processed route Identifiers
-
putRoutes
Collection<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates> putRoutes(@NonNull org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction tx, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode nlri, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes, @NonNull 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.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 useputRoutes(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)- Parameters:
tx- DOMDataWriteTransactiontablePath- YangInstanceIdentifiernlri- ContainerNode DOM representation of NLRI in Update messageattributes- ContainerNoderoutesNodeId- NodeIdentifier of "routes" data node- Returns:
- List of processed routes identifiers
-
changedRoutes
@NonNull Collection<org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode> changedRoutes(@NonNull org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode routes) Returns routes that were modified within this RIB support instance.- Parameters:
routes- DataTreeCandidateNode- Returns:
- collection of modified nodes or empty collection if no node was modified
-
routePath
default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument routeId) Constructs an instance identifier path to routeId.- Parameters:
routesPath- YangInstanceIdentifier base pathrouteId- PathArgument leaf path- Returns:
- YangInstanceIdentifier with routesPath + specific RIB support routes path + routeId
-
routesPath
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath) Constructs an instance identifier path to routes list.- Parameters:
routesPath- YangInstanceIdentifier base path- Returns:
- YangInstanceIdentifier with routesPath + specific RIB support routes path
-
relativeRoutesPath
@NonNull 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.- Returns:
- Relative path.
-
buildUpdate
@NonNull Update buildUpdate(@NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> advertised, @NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode> withdrawn, @NonNull Attributes attr) 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.- 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
-
createRouteIdentifier
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier createRouteIdentifier(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier tablePath, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates newRouteKey) Creates Route table Peer InstanceIdentifier.- Parameters:
tablePath- table InstanceIdentifiernewRouteKey- route key- Returns:
- InstanceIdentifier
-
createRoute
@NonNull org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode createRoute(@Nullable org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route, @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates key, @NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributes) Creates a route with new path Id and attributes.- Parameters:
route- routekey- route keyattributes- route attributes- Returns:
- Route List key
-
getTablesKey
@NonNull TablesKey getTablesKey()Returns TablesKey which we are providing support.- Returns:
- TablesKey
-
tablesKey
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates tablesKey() -
fromNormalizedNode
Route fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routerId, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode normalizedNode) Translates supplied YANG Instance Identifier and NormalizedNode into Binding Route.- Parameters:
routerId- Binding Instance IdentifiernormalizedNode- NormalizedNode representing Route- Returns:
- Route
-
attributeFromContainerNode
@NonNull Attributes attributeFromContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode advertisedAttrs) Translates supplied YANG Instance Identifier and NormalizedNode into Binding data Attribute.- Parameters:
advertisedAttrs- NormalizedNode representing attributes- Returns:
- Attribute
-
attributeToContainerNode
@NonNull org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath, Attributes attributes) Translates supplied Binding Instance Identifier and data into NormalizedNode representation.- Parameters:
routePath- Binding Instance Identifier pointing to dataattributes- Data object representing Attributes- Returns:
- NormalizedNode representation
-
createRouteListArgument
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates createRouteListArgument(@NonNull org.opendaylight.yangtools.yang.common.Uint32 pathId, @NonNull String routeKey) Construct a Route List Key using new path Id for Families.- Parameters:
pathId- The path identifierrouteKey- RouteKey- Returns:
- route list Key (RouteKey + pathId)
-
createRouteListArgument
default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates createRouteListArgument(@NonNull String routeKey) Construct a Route List Key.- Parameters:
routeKey- RouteKey- Returns:
- route list Key (RouteKey + empty pathId)
-
toAddPathListArgument
default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates toAddPathListArgument(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) -
toNonPathListArgument
default @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates toNonPathListArgument(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) -
extractPathId
@NonNull org.opendaylight.yangtools.yang.common.Uint32 extractPathId(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Given a route list key, return the associated path ID.- Parameters:
routeListKey- Route list key- Returns:
- Path ID
-
extractRouteKey
@NonNull String extractRouteKey(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates routeListKey) Given a route list key, return the associated path ID.- Parameters:
routeListKey- Route list key- Returns:
- RouteKey
-
extractAttributes
@Nullable org.opendaylight.yangtools.yang.data.api.schema.ContainerNode extractAttributes(@NonNull org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Extract attributes from an route entry.- Parameters:
route- Route entry- Returns:
- Associated attributes, potentially null
- Throws:
NullPointerException- if route is null
-