private static final Logger LOG = LoggerFactory.getLogger(DataTreeChangeListenerImpl.class);
private static final long STARTUP_LOOP_TICK = 500L;
private static final int STARTUP_LOOP_MAX_RETRIES = 8;
- protected final ListenerRegistration<DataTreeChangeListener> listenerRegistration;
+ protected final ListenerRegistration<?> listenerRegistration;
protected OperationProcessor operationProcessor;
static final InstanceIdentifier<Topology> II_TO_TOPOLOGY = InstanceIdentifier.create(NetworkTopology.class)
nodeKeyInTopology).build();
}
- NodeId provideTopologyNodeId(InstanceIdentifier<T> iiToNodeInInventory) {
+ NodeId provideTopologyNodeId(final InstanceIdentifier<T> iiToNodeInInventory) {
final NodeKey inventoryNodeKey = iiToNodeInInventory.firstKeyOf(Node.class);
if (inventoryNodeKey != null) {
return new NodeId(inventoryNodeKey.getId().getValue());
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
import org.opendaylight.yangtools.util.concurrent.FluentFutures;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase {
@SuppressWarnings({ "rawtypes" })
newLink("link1", newSourceNode("node1"), newDestNode("dest")),
newLink("link2", newSourceNode("source"), newDestNode("node1")),
newLink("link3", newSourceNode("source2"), newDestNode("dest2")));
- final Topology topology = new TopologyBuilder().withKey(topologyIID.getKey()).setLink(linkList).build();
+ final Topology topology = new TopologyBuilder().withKey(topologyIID.getKey())
+ .setLink(BindingMap.ordered(linkList))
+ .build();
final InstanceIdentifier[] expDeletedIIDs = {
topologyIID.child(Link.class, linkList.get(0).key()),
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey;
import org.opendaylight.yangtools.util.concurrent.FluentFutures;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
public class TerminationPointChangeListenerImplTest extends DataTreeChangeListenerBase {
@SuppressWarnings("rawtypes")
newLink("link1", newSourceTp("tp1"), newDestTp("dest")),
newLink("link2", newSourceTp("source"), newDestTp("tp1")),
newLink("link3", newSourceTp("source2"), newDestTp("dest2")));
- final Topology topology = new TopologyBuilder().withKey(topologyIID.getKey()).setLink(linkList).build();
+ final Topology topology = new TopologyBuilder().withKey(topologyIID.getKey())
+ .setLink(BindingMap.ordered(linkList))
+ .build();
final InstanceIdentifier[] expDeletedIIDs = {
topologyIID.child(Link.class, linkList.get(0).key()),
final InstanceIdentifier<?> invNodeConnID = newNodeConnID(nodeKey, ncKey);
List<Link> linkList = Arrays.asList(newLink("link1", newSourceTp("tp1"), newDestTp("dest")));
- Topology topology = new TopologyBuilder().withKey(topologyIID.getKey()).setLink(linkList).build();
+ Topology topology = new TopologyBuilder().withKey(topologyIID.getKey())
+ .setLink(BindingMap.ordered(linkList))
+ .build();
ReadWriteTransaction mockTx = mock(ReadWriteTransaction.class);
doReturn(FluentFutures.immediateFluentFuture(Optional.of(topology))).when(mockTx)
final InstanceIdentifier<?> invNodeConnID = newNodeConnID(nodeKey, ncKey);
List<Link> linkList = Arrays.asList(newLink("link1", newSourceTp("tp1"), newDestTp("dest")));
- Topology topology = new TopologyBuilder().withKey(topologyIID.getKey()).setLink(linkList).build();
+ Topology topology = new TopologyBuilder().withKey(topologyIID.getKey())
+ .setLink(BindingMap.ordered(linkList))
+ .build();
ReadWriteTransaction mockTx = mock(ReadWriteTransaction.class);
doReturn(FluentFutures.immediateFluentFuture(Optional.of(topology))).when(mockTx)