@Test public void testOnDataTreeChanged_remove() throws Exception { final Node topologyNode = createNetworkTopologyNode("topology-node-id-2"); Mockito.when(dataTreeModification.getRootNode()).thenReturn(rootNode); Mockito.when(rootNode.getDataBefore()).thenReturn(null); Mockito.when(rootNode.getDataAfter()).thenReturn(topologyNode); listener.onDataTreeChanged(Collections.singleton(dataTreeModification)); Mockito.verify(nodeManager).syncNodes(topologyNode, null); }
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) { printTraceStart(LOG); for (DataTreeModification<Node> modification : changes) { DataObjectModification<Node> rootNode = modification.getRootNode(); Node dataAfter = rootNode.getDataAfter(); Node dataBefore = rootNode.getDataBefore(); nodeManager.syncNodes(dataAfter, dataBefore); } }
IosXeCapableNodeListenerImpl implements ClusteredDataTreeChangeListener<Node>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) { printTraceStart(LOG); for (DataTreeModification<Node> modification : changes) { DataObjectModification<Node> rootNode = modification.getRootNode(); Node dataAfter = rootNode.getDataAfter(); Node dataBefore = rootNode.getDataBefore(); nodeManager.syncNodes(dataAfter, dataBefore); } } }
IosXeCapableNodeListenerImpl implements ClusteredDataTreeChangeListener<Node>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) { printTraceStart(LOG); for (DataTreeModification<Node> modification : changes) { DataObjectModification<Node> rootNode = modification.getRootNode(); Node dataAfter = rootNode.getDataAfter(); Node dataBefore = rootNode.getDataBefore(); nodeManager.syncNodes(dataAfter, dataBefore); } } IosXeCapableNodeListenerImpl(final DataBroker dataBroker, final NodeManager nodeManager); }
IosXeCapableNodeListenerImpl implements ClusteredDataTreeChangeListener<Node>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) { printTraceStart(LOG); for (DataTreeModification<Node> modification : changes) { DataObjectModification<Node> rootNode = modification.getRootNode(); Node dataAfter = rootNode.getDataAfter(); Node dataBefore = rootNode.getDataBefore(); nodeManager.syncNodes(dataAfter, dataBefore); } } IosXeCapableNodeListenerImpl(final DataBroker dataBroker, final NodeManager nodeManager); @Override void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes); @Override void close(); }
IosXeCapableNodeListenerImpl implements ClusteredDataTreeChangeListener<Node>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) { printTraceStart(LOG); for (DataTreeModification<Node> modification : changes) { DataObjectModification<Node> rootNode = modification.getRootNode(); Node dataAfter = rootNode.getDataAfter(); Node dataBefore = rootNode.getDataBefore(); nodeManager.syncNodes(dataAfter, dataBefore); } } IosXeCapableNodeListenerImpl(final DataBroker dataBroker, final NodeManager nodeManager); @Override void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes); @Override void close();  }