public interface RIBSupport<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>>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RIBSupport.ApplyRoute |
| Modifier and Type | Method and 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 routePath,
Attributes attributes)
Translates supplied Binding Instance Identifier and data into NormalizedNode representation.
|
@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.
|
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.yang.binding.BindingObject>> |
cacheableAttributeObjects() |
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.yang.binding.BindingObject>> |
cacheableNlriObjects() |
@NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode> |
changedRoutes(@NonNull org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode routes)
Returns routes that were modified within this RIB support instance.
|
R |
createRoute(R route,
I key,
@NonNull Attributes attributes)
Creates a route with new path Id and attributes.
|
@NonNull org.opendaylight.yangtools.yang.binding.InstanceIdentifier<R> |
createRouteIdentifier(@NonNull org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Tables,TablesKey> tableKey,
I newRouteKey)
Creates Route table Peer InstanceIdentifier.
|
I |
createRouteListKey(@NonNull PathId pathId,
@NonNull String routeKey)
Construct a Route List Key using new path Id for Families.
|
default I |
createRouteListKey(@NonNull String routeKey)
Construct a Route List Key.
|
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.
|
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.
|
S |
emptyRoutesContainer()
Return the table-type-specific empty routes container, as augmented into the
bgp-peer model under /peer/effect-rib-in/tables/routes choice node/routes container.
|
@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.
|
@NonNull List<R> |
extractAdjRibInRoutes(Routes routes)
Extract a route list from the adj-rib-in instantiation of table routes.
|
@NonNull PathId |
extractPathId(I routeListKey)
Given a route list key, return the associated path ID.
|
@NonNull String |
extractRouteKey(I routeListKey)
Given a route list key, return the associated path ID.
|
R |
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 Class<? extends AddressFamily> |
getAfi() |
@NonNull Class<? extends SubsequentAddressFamily> |
getSafi() |
TablesKey |
getTablesKey()
Returns 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> |
relativeRoutesPath()
Return the relative path from the generic routes container to the AFI/SAFI specific route list.
|
@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.
|
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.
|
@NonNull Class<C> |
routesCaseClass()
Return class object of the Routes Case statement.
|
@NonNull Class<S> |
routesContainerClass()
Return class object of the Routes Container statement.
|
@NonNull Class<R> |
routesListClass()
Return class object of the Routes List statement.
|
@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.
|
@NonNull org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode emptyTable()
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier routeAttributesIdentifier()
@NonNull Class<C> routesCaseClass()
@NonNull Class<S> routesContainerClass()
@NonNull Class<R> routesListClass()
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.yang.binding.BindingObject>> cacheableAttributeObjects()
default @NonNull com.google.common.collect.ImmutableCollection<Class<? extends org.opendaylight.yangtools.yang.binding.BindingObject>> cacheableNlriObjects()
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)
tx - DOMDataWriteTransactiontablePath - YangInstanceIdentifiernlri - ContainerNode DOM representation of NLRI in Update messagevoid 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)
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 use deleteRoutes(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)
tx - DOMDataWriteTransactiontablePath - YangInstanceIdentifiernlri - ContainerNode DOM representation of NLRI in Update messageroutesNodeId - NodeIdentifier of "routes" data nodeCollection<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)
tx - DOMDataWriteTransactiontablePath - YangInstanceIdentifiernlri - ContainerNode DOM representation of NLRI in Update messageattributes - ContainerNodeCollection<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)
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 use 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)
tx - DOMDataWriteTransactiontablePath - YangInstanceIdentifiernlri - ContainerNode DOM representation of NLRI in Update messageattributes - ContainerNoderoutesNodeId - NodeIdentifier of "routes" data node@NonNull Collection<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode> changedRoutes(@NonNull org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode routes)
routes - DataTreeCandidateNodedefault @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)
routesPath - YangInstanceIdentifier base pathrouteId - PathArgument leaf path@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath(@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routesPath)
routesPath - YangInstanceIdentifier base path@NonNull List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> relativeRoutesPath()
@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)
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@NonNull Class<? extends AddressFamily> getAfi()
@NonNull Class<? extends SubsequentAddressFamily> getSafi()
@NonNull org.opendaylight.yangtools.yang.binding.InstanceIdentifier<R> createRouteIdentifier(@NonNull org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Tables,TablesKey> tableKey, I newRouteKey)
tableKey - table InstanceIdentifiernewRouteKey - route keyR createRoute(R route, I key, @NonNull Attributes attributes)
route - routekey - route keyattributes - route attributesTablesKey getTablesKey()
R fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routerId, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> normalizedNode)
routerId - Binding Instance IdentifiernormalizedNode - NormalizedNode representing RouteAttributes attributeFromContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode advertisedAttrs)
advertisedAttrs - NormalizedNode representing attributesorg.opendaylight.yangtools.yang.data.api.schema.ContainerNode attributeToContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier routePath,
Attributes attributes)
routePath - Binding Instance Identifier pointing to dataattributes - Data object representing AttributesS emptyRoutesContainer()
I createRouteListKey(@NonNull PathId pathId, @NonNull String routeKey)
pathId - The path identifierrouteKey - RouteKeydefault I createRouteListKey(@NonNull String routeKey)
routeKey - RouteKey@NonNull PathId extractPathId(I routeListKey)
routeListKey - Route list key@NonNull String extractRouteKey(I routeListKey)
routeListKey - Route list keyCopyright © 2020 OpenDaylight. All rights reserved.