final DOMDataWriteTransaction tx = this.chain.newWriteOnlyTransaction();
LOG.debug("Received data change to ApplicationRib {}", changes);
for (final DataTreeCandidate tc : changes) {
+ LOG.debug("Modification Type {}", tc.getRootNode().getModificationType());
final YangInstanceIdentifier path = tc.getRootPath();
final PathArgument lastArg = path.getLastPathArgument();
Verify.verify(lastArg instanceof NodeIdentifierWithPredicates, "Unexpected type %s in path %s", lastArg.getClass(), path);
private void update(final DOMDataWriteTransaction tx, final Collection<DataTreeCandidate> changes,
final Map<RouteUpdateKey, AbstractRouteEntry> toUpdate) {
-
for (final DataTreeCandidate tc : changes) {
- // call out peer-role has changed
+ LOG.debug("Modification type {}", tc.getRootNode().getModificationType());
final YangInstanceIdentifier rootPath = tc.getRootPath();
final DataTreeCandidateNode rootNode = tc.getRootNode();
final DataTreeCandidateNode roleChange = rootNode.getModifiedChild(AbstractPeerRoleTracker.PEER_ROLE_NID);
final UnsignedInteger routerId = RouterIds.routerIdForPeerId(peerId);
for (final DataTreeCandidateNode child : table.getChildNodes()) {
if ((Attributes.QNAME).equals(child.getIdentifier().getNodeType())) {
- // putting uptodate attribute in
- LOG.trace("Uptodate found for {}", child.getDataAfter());
- tx.put(LogicalDatastoreType.OPERATIONAL, this.locRibTarget.node(child.getIdentifier()), child.getDataAfter().get());
+ if (child.getDataAfter().isPresent()) {
+ // putting uptodate attribute in
+ LOG.trace("Uptodate found for {}", child.getDataAfter());
+ tx.put(LogicalDatastoreType.OPERATIONAL, this.locRibTarget.node(child.getIdentifier()), child.getDataAfter().get());
+ }
continue;
}
for (final DataTreeCandidateNode route : this.ribSupport.changedRoutes(child)) {