We have a few users of deprecated methods, let's migrate them.
Change-Id: Ie57ca80e63ff1efd0d864f87ad5acb48306da16c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
public void onDataTreeChanged(final List<DataTreeCandidate> changes) {
LOG.debug("Data change received for AdjRibOut {}", changes);
for (var tc : changes) {
- LOG.trace("Change {} type {}", tc.getRootNode(), tc.getRootNode().getModificationType());
- for (var child : tc.getRootNode().getChildNodes()) {
+ LOG.trace("Change {} type {}", tc.getRootNode(), tc.getRootNode().modificationType());
+ for (var child : tc.getRootNode().childNodes()) {
for (var route : support.changedRoutes(child)) {
processRouteChange(route);
}
private void processRouteChange(final DataTreeCandidateNode route) {
final Update update;
- switch (route.getModificationType()) {
+ switch (route.modificationType()) {
case UNMODIFIED:
LOG.debug("Skipping unmodified route {}", route.name());
return;
LOG.debug("Advertising routes {}", update);
break;
default:
- LOG.warn("Ignoring unhandled modification type {}", route.getModificationType());
+ LOG.warn("Ignoring unhandled modification type {}", route.modificationType());
return;
}
session.write(update);
for (final DataTreeCandidate tc : changes) {
final YangInstanceIdentifier rootPath = tc.getRootPath();
final DataTreeCandidateNode root = tc.getRootNode();
- for (final DataTreeCandidateNode table : root.getChildNodes()) {
+ for (final DataTreeCandidateNode table : root.childNodes()) {
if (tx == null) {
tx = chain.newWriteOnlyTransaction();
}
}
final YangInstanceIdentifier effectiveTablePath = effectiveTablePath(tableKey);
- final ModificationType modificationType = root.getModificationType();
+ final ModificationType modificationType = root.modificationType();
LOG.debug("Effective table {} modification type {}", effectiveTablePath, modificationType);
switch (modificationType) {
case DISAPPEARED:
final YangInstanceIdentifier routesPath, final DataTreeCandidateNode route, final boolean longLivedStale) {
LOG.debug("Process route {}", route.name());
final YangInstanceIdentifier routePath = ribSupport.routePath(routesPath, route.name());
- switch (route.getModificationType()) {
+ switch (route.modificationType()) {
case DELETE:
case DISAPPEARED:
deleteRoute(tx, ribSupport, routePath, route.dataBefore());
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate;
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode;
final Uint32 pathId = ribSupport.extractPathId(routeId);
RouteEntry<C, S> entry;
- switch (route.getModificationType()) {
+ switch (route.modificationType()) {
case DELETE:
entry = routeEntries.get(routeKey);
if (entry != null) {
entry = createEntry(routeKey);
}
- final NormalizedNode routeAfter = route.getDataAfter();
+ final var routeAfter = route.getDataAfter();
verify(routeAfter instanceof MapEntryNode, "Unexpected route %s", routeAfter);
entry.addRoute(routerId, pathId, (MapEntryNode) routeAfter);
totalPathsCounter.increment();