Fix EffectiveRibInWriter uptodate handling 69/80569/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 25 Feb 2019 11:19:49 +0000 (12:19 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 25 Feb 2019 11:21:00 +0000 (12:21 +0100)
One of the uptodate checking paths was passing entire attributes
rather than just the uptodate leaf. Fix that.

JIRA: BGPCEP-495
Change-Id: Ib66a34d9a97f76234bd2105cd2b985a03f78d7b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java

index aa0fdea0f4ff6aee4d563fec1784b89616206a4f..15c0da77025545672c581b5d8335060a173ed36f 100644 (file)
@@ -330,7 +330,8 @@ final class EffectiveRibInWriter implements PrefixesReceivedCounters, PrefixesIn
             final YangInstanceIdentifier effAttrsPath = effectiveTablePath.node(ATTRIBUTES_NID);
             final Optional<NormalizedNode<?, ?>> optAttrsAfter = modifiedAttrs.getDataAfter();
             if (optAttrsAfter.isPresent()) {
-                tx.put(LogicalDatastoreType.OPERATIONAL, effAttrsPath, effectiveAttributes(optAttrsAfter));
+                tx.put(LogicalDatastoreType.OPERATIONAL, effAttrsPath, effectiveAttributes(
+                    NormalizedNodes.findNode(optAttrsAfter.get(), UPTODATE_NID)));
             } else {
                 tx.delete(LogicalDatastoreType.OPERATIONAL, effAttrsPath);
             }