X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fregistry%2Fflow%2FDeviceFlowRegistryImplTest.java;h=250d13615c08833ec81a3b51801357d4ef807639;hb=d1af0fd5a4053a10917f631bae42970c1960fd20;hp=dafa7ca27e233202e06d2f64b3e591fbd66dead1;hpb=deb54a036f798b3c69729cf6c84675709a207e1b;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImplTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImplTest.java index dafa7ca27e..250d13615c 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImplTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImplTest.java @@ -33,6 +33,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.openflowplugin.api.OFConstants; import org.opendaylight.openflowplugin.api.openflow.registry.flow.FlowDescriptor; import org.opendaylight.openflowplugin.api.openflow.registry.flow.FlowRegistryKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; @@ -73,9 +74,9 @@ public class DeviceFlowRegistryImplTest { public void setUp() throws Exception { nodeInstanceIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(new NodeId(NODE_ID))); when(dataBroker.newReadOnlyTransaction()).thenReturn(readOnlyTransaction); - deviceFlowRegistry = new DeviceFlowRegistryImpl(dataBroker, nodeInstanceIdentifier); + deviceFlowRegistry = new DeviceFlowRegistryImpl(OFConstants.OFP_VERSION_1_3, dataBroker, nodeInstanceIdentifier); final FlowAndStatisticsMapList flowStats = TestFlowHelper.createFlowAndStatisticsMapListBuilder(1).build(); - key = FlowRegistryKeyFactory.create(flowStats); + key = FlowRegistryKeyFactory.create(OFConstants.OFP_VERSION_1_3, flowStats); descriptor = FlowDescriptorFactory.create(key.getTableId(), new FlowId("ut:1")); Assert.assertEquals(0, deviceFlowRegistry.getAllFlowDescriptors().size()); @@ -103,7 +104,7 @@ public class DeviceFlowRegistryImplTest { .build(); final Map allFlowDescriptors = testFill(path, flowCapableNode); - final FlowRegistryKey key = FlowRegistryKeyFactory.create(flow); + final FlowRegistryKey key = FlowRegistryKeyFactory.create(OFConstants.OFP_VERSION_1_3, flow); InOrder order = inOrder(dataBroker, readOnlyTransaction); order.verify(dataBroker).newReadOnlyTransaction(); @@ -178,7 +179,7 @@ public class DeviceFlowRegistryImplTest { // store new key with old value final FlowAndStatisticsMapList flowStats = TestFlowHelper.createFlowAndStatisticsMapListBuilder(2).build(); - final FlowRegistryKey key2 = FlowRegistryKeyFactory.create(flowStats); + final FlowRegistryKey key2 = FlowRegistryKeyFactory.create(OFConstants.OFP_VERSION_1_3, flowStats); deviceFlowRegistry.store(key2, descriptor); Assert.assertEquals(2, deviceFlowRegistry.getAllFlowDescriptors().size()); Assert.assertEquals("ut:1", deviceFlowRegistry.retrieveIdForFlow(key2).getFlowId().getValue()); @@ -197,7 +198,7 @@ public class DeviceFlowRegistryImplTest { //store new key final String alienPrefix = "#UF$TABLE*2-"; - final FlowRegistryKey key2 = FlowRegistryKeyFactory.create(TestFlowHelper.createFlowAndStatisticsMapListBuilder(2).build()); + final FlowRegistryKey key2 = FlowRegistryKeyFactory.create(OFConstants.OFP_VERSION_1_3, TestFlowHelper.createFlowAndStatisticsMapListBuilder(2).build()); newFlowId = deviceFlowRegistry.storeIfNecessary(key2); Assert.assertTrue(newFlowId.getValue().startsWith(alienPrefix)); @@ -238,4 +239,4 @@ public class DeviceFlowRegistryImplTest { return null; } -} \ No newline at end of file +}