From: Stephen Kitt Date: Thu, 31 May 2018 13:23:17 +0000 (+0200) Subject: Fixup Augmentable and Identifiable methods changing X-Git-Tag: release/fluorine~45^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=137e4d7d86e8f402f3d52fd0fa162792f9ff60eb;p=openflowplugin.git Fixup Augmentable and Identifiable methods changing This is a fixup of the change in binding codegen, adjusting: - getKey() -> key() - setKey() -> withKey() - getAugmentation() -> augmentation() JIRA: TSC-101 Change-Id: I4285ddfd3b49880053bb9cd1b49ed33fef4bbfb9 Signed-off-by: Stephen Kitt --- diff --git a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/BulkOMaticUtils.java b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/BulkOMaticUtils.java index 9d095c2644..60114cf99e 100644 --- a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/BulkOMaticUtils.java +++ b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/BulkOMaticUtils.java @@ -61,7 +61,7 @@ public final class BulkOMaticUtils { public static Flow buildFlow(Short tableId, String flowId, Match match) { FlowBuilder flowBuilder = new FlowBuilder(); - flowBuilder.setKey(new FlowKey(new FlowId(flowId))); + flowBuilder.withKey(new FlowKey(new FlowId(flowId))); flowBuilder.setTableId(tableId); flowBuilder.setMatch(match); return flowBuilder.build(); diff --git a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriter.java b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriter.java index ae354e8f01..65986cd1db 100644 --- a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriter.java +++ b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriter.java @@ -90,7 +90,7 @@ public class TableWriter implements FlowCounterMBean { String dpId = BulkOMaticUtils.DEVICE_TYPE_PREFIX + String.valueOf(dpn); for (short tableId = startTableId; tableId <= endTableId; tableId++) { WriteTransaction wtx = dataBroker.newWriteOnlyTransaction(); - Table table = new TableBuilder().setKey(new TableKey(tableId)).setId(tableId).build(); + Table table = new TableBuilder().withKey(new TableKey(tableId)).setId(tableId).build(); InstanceIdentifier tableIId = BulkOMaticUtils.getTableId(tableId, dpId); if (isAdd) { diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java index 417e56e184..7f62bdd138 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java @@ -243,7 +243,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { if (rpcResult.isSuccessful()) { for (Meter meter : meters) { final KeyedInstanceIdentifier meterIdent = nodeIdentity - .child(Meter.class, meter.getKey()); + .child(Meter.class, meter.key()); provider.getMeterCommiter().add(meterIdent, meter, nodeIdentity); } } @@ -329,7 +329,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { ? flowNode.get().getTableFeatures() : Collections.emptyList(); for (TableFeatures tableFeaturesItem : tableList) { - TableFeaturesKey tableKey = tableFeaturesItem.getKey(); + TableFeaturesKey tableKey = tableFeaturesItem.key(); KeyedInstanceIdentifier tableFeaturesII = nodeIdentity .child(TableFeatures.class, new TableFeaturesKey(tableKey.getTableId())); provider.getTableFeaturesCommiter().update(tableFeaturesII, tableFeaturesItem, null, nodeIdentity); @@ -441,7 +441,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { : Collections.emptyList(); for (Meter meter : meters) { final KeyedInstanceIdentifier meterIdent = nodeIdentity.child(Meter.class, - meter.getKey()); + meter.key()); provider.getMeterCommiter().add(meterIdent, meter, nodeIdentity); } @@ -454,11 +454,11 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { : Collections.
emptyList(); for (Table table : tables) { final KeyedInstanceIdentifier tableIdent = nodeIdentity.child(Table.class, - table.getKey()); + table.key()); List flows = table.getFlow() != null ? table.getFlow() : Collections.emptyList(); for (Flow flow : flows) { final KeyedInstanceIdentifier flowIdent = tableIdent.child(Flow.class, - flow.getKey()); + flow.key()); provider.getFlowCommiter().add(flowIdent, flow, nodeIdentity); } } @@ -478,7 +478,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { * The group to add. */ private void addGroup(Map> map, Group group) { - KeyedInstanceIdentifier groupIdent = nodeIdentity.child(Group.class, group.getKey()); + KeyedInstanceIdentifier groupIdent = nodeIdentity.child(Group.class, group.key()); final Long groupId = group.getGroupId().getValue(); ListenableFuture future = JdkFutureAdapters .listenInPoolThread(provider.getGroupCommiter().add(groupIdent, group, nodeIdentity)); @@ -566,7 +566,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { : Collections.
emptyList(); for (Table table : tables) { final KeyedInstanceIdentifier tableIdent = nodeIdent.child(Table.class, - table.getKey()); + table.key()); List staleFlows = table.getStaleFlow() != null ? table.getStaleFlow() : Collections.emptyList(); for (StaleFlow staleFlow : staleFlows) { @@ -575,7 +575,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { Flow toBeDeletedFlow = flowBuilder.setId(staleFlow.getId()).build(); final KeyedInstanceIdentifier flowIdent = tableIdent.child(Flow.class, - toBeDeletedFlow.getKey()); + toBeDeletedFlow.key()); this.provider.getFlowCommiter().remove(flowIdent, toBeDeletedFlow, nodeIdent); @@ -599,7 +599,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { Group toBeDeletedGroup = groupBuilder.setGroupId(staleGroup.getGroupId()).build(); final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, - toBeDeletedGroup.getKey()); + toBeDeletedGroup.key()); this.provider.getGroupCommiter().remove(groupIdent, toBeDeletedGroup, nodeIdent); @@ -618,7 +618,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation { Meter toBeDeletedMeter = meterBuilder.setMeterId(staleMeter.getMeterId()).build(); final KeyedInstanceIdentifier meterIdent = nodeIdent.child(Meter.class, - toBeDeletedMeter.getKey()); + toBeDeletedMeter.key()); this.provider.getMeterCommiter().remove(meterIdent, toBeDeletedMeter, nodeIdent); diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ReconciliationServiceImpl.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ReconciliationServiceImpl.java index e7f1dd2507..bd4477dbb4 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ReconciliationServiceImpl.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ReconciliationServiceImpl.java @@ -41,7 +41,7 @@ public class ReconciliationServiceImpl implements ReconciliationService { private Node buildNode(long nodeIid) { NodeId nodeId = new NodeId("openflow:" + nodeIid); - Node nodeDpn = new NodeBuilder().setId(nodeId).setKey(new NodeKey(nodeId)).build(); + Node nodeDpn = new NodeBuilder().setId(nodeId).withKey(new NodeKey(nodeId)).build(); return nodeDpn; } @@ -50,7 +50,7 @@ public class ReconciliationServiceImpl implements ReconciliationService { LOG.debug("Triggering reconciliation for node: {}", input.getNodeId().toString()); Node nodeDpn = buildNode(input.getNodeId().longValue()); InstanceIdentifier connectedNode = InstanceIdentifier.builder(Nodes.class) - .child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).build(); + .child(Node.class, nodeDpn.key()).augmentation(FlowCapableNode.class).build(); SettableFuture> rpcResult = SettableFuture.create(); ListenableFuture futureResult = forwardingRulesManagerImpl .getNodeListener().reconcileConfiguration(connectedNode); diff --git a/applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java b/applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java index 78b26ec8e9..d4faccda1d 100644 --- a/applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java +++ b/applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java @@ -90,8 +90,8 @@ public class FlowListenerTest extends FRMTest { .augmentation(FlowCapableNode.class).child(Table.class, tableKey); InstanceIdentifier flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(Flow.class, flowKey); - Table table = new TableBuilder().setKey(tableKey).setFlow(Collections.emptyList()).build(); - Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build(); + Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.emptyList()).build(); + Flow flow = new FlowBuilder().withKey(flowKey).setTableId((short) 2).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table); @@ -105,7 +105,7 @@ public class FlowListenerTest extends FRMTest { flowKey = new FlowKey(new FlowId("test_Flow2")); flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class) .child(Table.class, tableKey).child(Flow.class, flowKey); - flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build(); + flow = new FlowBuilder().withKey(flowKey).setTableId((short) 2).build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, flowII, flow); assertCommit(writeTx.submit()); @@ -126,8 +126,8 @@ public class FlowListenerTest extends FRMTest { .augmentation(FlowCapableNode.class).child(Table.class, tableKey); InstanceIdentifier flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(Flow.class, flowKey); - Table table = new TableBuilder().setKey(tableKey).setFlow(Collections.emptyList()).build(); - Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build(); + Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.emptyList()).build(); + Flow flow = new FlowBuilder().withKey(flowKey).setTableId((short) 2).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table); @@ -141,7 +141,7 @@ public class FlowListenerTest extends FRMTest { flowKey = new FlowKey(new FlowId("test_Flow")); flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class) .child(Table.class, tableKey).child(Flow.class, flowKey); - flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).setOutGroup((long) 5).build(); + flow = new FlowBuilder().withKey(flowKey).setTableId((short) 2).setOutGroup((long) 5).build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, flowII, flow); assertCommit(writeTx.submit()); @@ -163,10 +163,10 @@ public class FlowListenerTest extends FRMTest { .augmentation(FlowCapableNode.class).child(Table.class, tableKey); InstanceIdentifier flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(Flow.class, flowKey); - Table table = new TableBuilder().setKey(tableKey).setFlow(Collections.emptyList()).build(); + Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.emptyList()).build(); IpMatch ipMatch = new IpMatchBuilder().setIpDscp(new Dscp((short) 4)).build(); Match match = new MatchBuilder().setIpMatch(ipMatch).build(); - Flow flow = new FlowBuilder().setMatch(match).setKey(flowKey).setTableId((short) 2).build(); + Flow flow = new FlowBuilder().setMatch(match).withKey(flowKey).setTableId((short) 2).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table); @@ -182,7 +182,7 @@ public class FlowListenerTest extends FRMTest { .child(Table.class, tableKey).child(Flow.class, flowKey); ipMatch = new IpMatchBuilder().setIpDscp(new Dscp((short) 5)).build(); match = new MatchBuilder().setIpMatch(ipMatch).build(); - flow = new FlowBuilder().setMatch(match).setKey(flowKey).setTableId((short) 2).build(); + flow = new FlowBuilder().setMatch(match).withKey(flowKey).setTableId((short) 2).build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, flowII, flow); assertCommit(writeTx.submit()); @@ -203,8 +203,8 @@ public class FlowListenerTest extends FRMTest { .augmentation(FlowCapableNode.class).child(Table.class, tableKey); InstanceIdentifier flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(Flow.class, flowKey); - Table table = new TableBuilder().setKey(tableKey).setFlow(Collections.emptyList()).build(); - Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build(); + Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.emptyList()).build(); + Flow flow = new FlowBuilder().withKey(flowKey).setTableId((short) 2).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table); @@ -236,8 +236,8 @@ public class FlowListenerTest extends FRMTest { .augmentation(FlowCapableNode.class).child(Table.class, tableKey); InstanceIdentifier flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(StaleFlow.class, flowKey); - Table table = new TableBuilder().setKey(tableKey).setStaleFlow(Collections.emptyList()).build(); - StaleFlow flow = new StaleFlowBuilder().setKey(flowKey).setTableId((short) 2).build(); + Table table = new TableBuilder().withKey(tableKey).setStaleFlow(Collections.emptyList()).build(); + StaleFlow flow = new StaleFlowBuilder().withKey(flowKey).setTableId((short) 2).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table); diff --git a/applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java b/applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java index 4a6bc51e6a..d4cc4556ba 100644 --- a/applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java +++ b/applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java @@ -85,7 +85,7 @@ public class GroupListenerTest extends FRMTest { GroupKey groupKey = new GroupKey(new GroupId((long) 255)); InstanceIdentifier groupII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Group.class, groupKey); - Group group = new GroupBuilder().setKey(groupKey).setGroupName("Group1").build(); + Group group = new GroupBuilder().withKey(groupKey).setGroupName("Group1").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); @@ -98,7 +98,7 @@ public class GroupListenerTest extends FRMTest { groupKey = new GroupKey(new GroupId((long) 256)); groupII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Group.class, groupKey); - group = new GroupBuilder().setKey(groupKey).setGroupName("Group1").build(); + group = new GroupBuilder().withKey(groupKey).setGroupName("Group1").build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); assertCommit(writeTx.submit()); @@ -115,7 +115,7 @@ public class GroupListenerTest extends FRMTest { GroupKey groupKey = new GroupKey(new GroupId((long) 255)); InstanceIdentifier groupII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Group.class, groupKey); - Group group = new GroupBuilder().setKey(groupKey).setGroupName("Group1").build(); + Group group = new GroupBuilder().withKey(groupKey).setGroupName("Group1").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); @@ -125,7 +125,7 @@ public class GroupListenerTest extends FRMTest { assertEquals(1, addGroupCalls.size()); assertEquals("DOM-0", addGroupCalls.get(0).getTransactionUri().getValue()); - group = new GroupBuilder().setKey(groupKey).setGroupName("Group2").build(); + group = new GroupBuilder().withKey(groupKey).setGroupName("Group2").build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); assertCommit(writeTx.submit()); @@ -142,7 +142,7 @@ public class GroupListenerTest extends FRMTest { GroupKey groupKey = new GroupKey(new GroupId((long) 255)); InstanceIdentifier groupII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Group.class, groupKey); - Group group = new GroupBuilder().setKey(groupKey).setGroupName("Group1").build(); + Group group = new GroupBuilder().withKey(groupKey).setGroupName("Group1").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); @@ -168,7 +168,7 @@ public class GroupListenerTest extends FRMTest { StaleGroupKey groupKey = new StaleGroupKey(new GroupId((long) 255)); InstanceIdentifier groupII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(StaleGroup.class, groupKey); - StaleGroup group = new StaleGroupBuilder().setKey(groupKey).setGroupName("Stale_Group1").build(); + StaleGroup group = new StaleGroupBuilder().withKey(groupKey).setGroupName("Stale_Group1").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, groupII, group); diff --git a/applications/forwardingrules-manager/src/test/java/test/mock/MeterListenerTest.java b/applications/forwardingrules-manager/src/test/java/test/mock/MeterListenerTest.java index 12a88c4104..7f6e40866f 100644 --- a/applications/forwardingrules-manager/src/test/java/test/mock/MeterListenerTest.java +++ b/applications/forwardingrules-manager/src/test/java/test/mock/MeterListenerTest.java @@ -84,7 +84,7 @@ public class MeterListenerTest extends FRMTest { MeterKey meterKey = new MeterKey(new MeterId((long) 2000)); InstanceIdentifier meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Meter.class, meterKey); - Meter meter = new MeterBuilder().setKey(meterKey).setMeterName("meter_one").build(); + Meter meter = new MeterBuilder().withKey(meterKey).setMeterName("meter_one").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); @@ -97,7 +97,7 @@ public class MeterListenerTest extends FRMTest { meterKey = new MeterKey(new MeterId((long) 2001)); meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Meter.class, meterKey); - meter = new MeterBuilder().setKey(meterKey).setMeterName("meter_two").setBarrier(true).build(); + meter = new MeterBuilder().withKey(meterKey).setMeterName("meter_two").setBarrier(true).build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); assertCommit(writeTx.submit()); @@ -115,7 +115,7 @@ public class MeterListenerTest extends FRMTest { MeterKey meterKey = new MeterKey(new MeterId((long) 2000)); InstanceIdentifier meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Meter.class, meterKey); - Meter meter = new MeterBuilder().setKey(meterKey).setMeterName("meter_one").setBarrier(false).build(); + Meter meter = new MeterBuilder().withKey(meterKey).setMeterName("meter_one").setBarrier(false).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); @@ -125,7 +125,7 @@ public class MeterListenerTest extends FRMTest { assertEquals(1, addMeterCalls.size()); assertEquals("DOM-0", addMeterCalls.get(0).getTransactionUri().getValue()); - meter = new MeterBuilder().setKey(meterKey).setMeterName("meter_two").setBarrier(true).build(); + meter = new MeterBuilder().withKey(meterKey).setMeterName("meter_two").setBarrier(true).build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); assertCommit(writeTx.submit()); @@ -143,7 +143,7 @@ public class MeterListenerTest extends FRMTest { MeterKey meterKey = new MeterKey(new MeterId((long) 2000)); InstanceIdentifier meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(Meter.class, meterKey); - Meter meter = new MeterBuilder().setKey(meterKey).setMeterName("meter_one").build(); + Meter meter = new MeterBuilder().withKey(meterKey).setMeterName("meter_one").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); @@ -170,7 +170,7 @@ public class MeterListenerTest extends FRMTest { StaleMeterKey meterKey = new StaleMeterKey(new MeterId((long) 2000)); InstanceIdentifier meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY) .augmentation(FlowCapableNode.class).child(StaleMeter.class, meterKey); - StaleMeter meter = new StaleMeterBuilder().setKey(meterKey).setMeterName("stale_meter_one").build(); + StaleMeter meter = new StaleMeterBuilder().withKey(meterKey).setMeterName("stale_meter_one").build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter); diff --git a/applications/forwardingrules-manager/src/test/java/test/mock/TableFeaturesListenerTest.java b/applications/forwardingrules-manager/src/test/java/test/mock/TableFeaturesListenerTest.java index ddaa0e68a8..b68359964e 100644 --- a/applications/forwardingrules-manager/src/test/java/test/mock/TableFeaturesListenerTest.java +++ b/applications/forwardingrules-manager/src/test/java/test/mock/TableFeaturesListenerTest.java @@ -73,7 +73,7 @@ public class TableFeaturesListenerTest extends FRMTest { addTable(tableKey, NODE_KEY); - TableFeatures tableFeaturesData = new TableFeaturesBuilder().setKey(tableFeaturesKey).build(); + TableFeatures tableFeaturesData = new TableFeaturesBuilder().withKey(tableFeaturesKey).build(); InstanceIdentifier tableFeaturesII = InstanceIdentifier.create(Nodes.class) .child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class) .child(TableFeatures.class, tableFeaturesKey); @@ -81,7 +81,7 @@ public class TableFeaturesListenerTest extends FRMTest { writeTx.put(LogicalDatastoreType.CONFIGURATION, tableFeaturesII, tableFeaturesData); assertCommit(writeTx.submit()); - tableFeaturesData = new TableFeaturesBuilder().setKey(tableFeaturesKey).setName("dummy name").build(); + tableFeaturesData = new TableFeaturesBuilder().withKey(tableFeaturesKey).setName("dummy name").build(); writeTx = getDataBroker().newWriteOnlyTransaction(); writeTx.put(LogicalDatastoreType.CONFIGURATION, tableFeaturesII, tableFeaturesData); assertCommit(writeTx.submit()); diff --git a/applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java b/applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java index 8156b1a67c..642a247153 100644 --- a/applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java +++ b/applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java @@ -36,7 +36,7 @@ public abstract class FRMTest extends AbstractDataBrokerTest { FlowCapableNodeBuilder fcnBuilder = new FlowCapableNodeBuilder(); NodeBuilder nodeBuilder = new NodeBuilder(); - nodeBuilder.setKey(nodeKey); + nodeBuilder.withKey(nodeKey); nodeBuilder.addAugmentation(FlowCapableNode.class, fcnBuilder.build()); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); @@ -58,7 +58,7 @@ public abstract class FRMTest extends AbstractDataBrokerTest { public void addTable(final TableKey tableKey, final NodeKey nodeKey) { addFlowCapableNode(nodeKey); - final Table table = new TableBuilder().setKey(tableKey).setFlow(Collections.emptyList()).build(); + final Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.emptyList()).build(); WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction(); InstanceIdentifier
tableII = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey) .augmentation(FlowCapableNode.class).child(Table.class, tableKey); diff --git a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListener.java b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListener.java index 9e805e2d18..f7f51b4753 100644 --- a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListener.java +++ b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListener.java @@ -177,7 +177,7 @@ public class SimplifiedOperationalListener extends AbstractFrmSyncListener private boolean isConsistentForReconcile(final DataTreeModification modification) { final NodeId nodeId = PathUtil.digNodeId(modification.getRootPath().getRootIdentifier()); final FlowCapableStatisticsGatheringStatus gatheringStatus = modification.getRootNode().getDataAfter() - .getAugmentation(FlowCapableStatisticsGatheringStatus.class); + .augmentation(FlowCapableStatisticsGatheringStatus.class); if (gatheringStatus == null) { LOG.trace("Statistics gathering never started: {}", nodeId.getValue()); diff --git a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java index 40265410b0..2e69f01900 100644 --- a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java +++ b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java @@ -154,7 +154,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final KeyedInstanceIdentifier tableIdent = nodeIdent.child(Table.class, tableKey); for (final Flow flow : flowSyncBox.getItemsToPush()) { - final KeyedInstanceIdentifier flowIdent = tableIdent.child(Flow.class, flow.getKey()); + final KeyedInstanceIdentifier flowIdent = tableIdent.child(Flow.class, flow.key()); LOG.trace("adding flow {} in table {} - absent on device {} match{}", flow.getId(), tableKey, nodeId, flow.getMatch()); @@ -169,7 +169,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final Flow updatedFlow = flowUpdate.getUpdated(); final KeyedInstanceIdentifier flowIdent = tableIdent.child(Flow.class, - updatedFlow.getKey()); + updatedFlow.key()); LOG.trace("flow {} in table {} - needs update on device {} match{}", updatedFlow.getId(), tableKey, nodeId, updatedFlow.getMatch()); @@ -213,7 +213,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy // loop flows on device and check if the are configured for (final Flow flow : flowsPerTable.getValue().getItemsToPush()) { final KeyedInstanceIdentifier flowIdent = - tableIdent.child(Flow.class, flow.getKey()); + tableIdent.child(Flow.class, flow.key()); allResults.add(JdkFutureAdapters.listenInPoolThread( flowForwarder.remove(flowIdent, flow, nodeIdent))); flowCrudCounts.incRemoved(); @@ -247,7 +247,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy LOG.trace("removing meter {} - absent in config {}", meter.getMeterId(), nodeId); final KeyedInstanceIdentifier meterIdent = - nodeIdent.child(Meter.class, meter.getKey()); + nodeIdent.child(Meter.class, meter.key()); allResults.add(JdkFutureAdapters.listenInPoolThread( meterForwarder.remove(meterIdent, meter, nodeIdent))); meterCrudCounts.incRemoved(); @@ -304,7 +304,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final ItemSyncBox groupsPortion) { List>> allResults = new ArrayList<>(); for (Group group : groupsPortion.getItemsToPush()) { - final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.getKey()); + final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.key()); allResults.add(JdkFutureAdapters.listenInPoolThread(groupForwarder.remove(groupIdent, group, nodeIdent))); } @@ -355,7 +355,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final List>> allUpdateResults = new ArrayList<>(); for (Group group : groupsPortion.getItemsToPush()) { - final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.getKey()); + final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.key()); allResults.add(JdkFutureAdapters.listenInPoolThread(groupForwarder.add(groupIdent, group, nodeIdent))); } @@ -364,7 +364,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final Group existingGroup = groupTuple.getOriginal(); final Group group = groupTuple.getUpdated(); - final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.getKey()); + final KeyedInstanceIdentifier groupIdent = nodeIdent.child(Group.class, group.key()); allUpdateResults.add(JdkFutureAdapters.listenInPoolThread( groupForwarder.update(groupIdent, existingGroup, group, nodeIdent))); } @@ -403,7 +403,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy final List>> allResults = new ArrayList<>(); final List>> allUpdateResults = new ArrayList<>(); for (Meter meter : syncBox.getItemsToPush()) { - final KeyedInstanceIdentifier meterIdent = nodeIdent.child(Meter.class, meter.getKey()); + final KeyedInstanceIdentifier meterIdent = nodeIdent.child(Meter.class, meter.key()); LOG.debug("adding meter {} - absent on device {}", meter.getMeterId(), nodeId); allResults.add(JdkFutureAdapters.listenInPoolThread( @@ -414,7 +414,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy for (ItemSyncBox.ItemUpdateTuple meterTuple : syncBox.getItemsToUpdate()) { final Meter existingMeter = meterTuple.getOriginal(); final Meter updated = meterTuple.getUpdated(); - final KeyedInstanceIdentifier meterIdent = nodeIdent.child(Meter.class, updated.getKey()); + final KeyedInstanceIdentifier meterIdent = nodeIdent.child(Meter.class, updated.key()); LOG.trace("meter {} - needs update on device {}", updated.getMeterId(), nodeId); allUpdateResults.add(JdkFutureAdapters.listenInPoolThread( meterForwarder.update(meterIdent, existingMeter, updated, nodeIdent))); diff --git a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java index 3c96f8b1b3..2c87661f5e 100644 --- a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java +++ b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java @@ -54,6 +54,6 @@ public final class ModificationUtil { if (dataAfter == null) { return null; } - return dataAfter.getAugmentation(FlowCapableNode.class); + return dataAfter.augmentation(FlowCapableNode.class); } } diff --git a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java index cb695b691a..685c2762be 100644 --- a/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java +++ b/applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java @@ -349,7 +349,7 @@ public final class ReconcileUtil { final ItemSyncBox flowsSyncBox = resolveFlowDiffsInTable( flowsConfigured, flowOperationalMap, gatherUpdates); if (!flowsSyncBox.isEmpty()) { - tableFlowSyncBoxes.put(tableConfigured.getKey(), flowsSyncBox); + tableFlowSyncBoxes.put(tableConfigured.key(), flowsSyncBox); } } return tableFlowSyncBoxes; diff --git a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java index 15b920d2b8..9ba97bfa13 100644 --- a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java +++ b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java @@ -108,7 +108,7 @@ public class SimplifiedOperationalListenerTest { Mockito.when(operationalNode.getId()).thenReturn(NODE_ID); Mockito.when(dataTreeModification.getRootPath()).thenReturn(dataTreeIdentifier); Mockito.when(dataTreeModification.getRootNode()).thenReturn(operationalModification); - Mockito.when(operationalNode.getAugmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode); + Mockito.when(operationalNode.augmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode); } @Test @@ -163,7 +163,7 @@ public class SimplifiedOperationalListenerTest { public void testOnDataTreeChangedReconcileButStaticsGatheringNotStarted() { Mockito.when(reconciliationRegistry.isRegistered(NODE_ID)).thenReturn(true); operationalUpdate(); - Mockito.when(operationalNode.getAugmentation(FlowCapableStatisticsGatheringStatus.class)).thenReturn(null); + Mockito.when(operationalNode.augmentation(FlowCapableStatisticsGatheringStatus.class)).thenReturn(null); nodeListenerOperational.onDataTreeChanged(Collections.singleton(dataTreeModification)); @@ -174,7 +174,7 @@ public class SimplifiedOperationalListenerTest { public void testOnDataTreeChangedReconcileButStaticsGatheringNotFinished() { Mockito.when(reconciliationRegistry.isRegistered(NODE_ID)).thenReturn(true); operationalUpdate(); - Mockito.when(operationalNode.getAugmentation(FlowCapableStatisticsGatheringStatus.class)) + Mockito.when(operationalNode.augmentation(FlowCapableStatisticsGatheringStatus.class)) .thenReturn(statisticsGatheringStatus); Mockito.when(statisticsGatheringStatus.getSnapshotGatheringStatusEnd()).thenReturn(null); @@ -187,7 +187,7 @@ public class SimplifiedOperationalListenerTest { public void testOnDataTreeChangedReconcileButStaticsGatheringNotSuccessful() { Mockito.when(reconciliationRegistry.isRegistered(NODE_ID)).thenReturn(true); operationalUpdate(); - Mockito.when(operationalNode.getAugmentation(FlowCapableStatisticsGatheringStatus.class)) + Mockito.when(operationalNode.augmentation(FlowCapableStatisticsGatheringStatus.class)) .thenReturn(statisticsGatheringStatus); Mockito.when(statisticsGatheringStatus.getSnapshotGatheringStatusEnd()).thenReturn(snapshotGatheringStatusEnd); Mockito.when(snapshotGatheringStatusEnd.isSucceeded()).thenReturn(false); @@ -255,7 +255,7 @@ public class SimplifiedOperationalListenerTest { } private void prepareFreshOperational(final boolean afterRegistration) throws ParseException { - Mockito.when(operationalNode.getAugmentation(FlowCapableStatisticsGatheringStatus.class)) + Mockito.when(operationalNode.augmentation(FlowCapableStatisticsGatheringStatus.class)) .thenReturn(statisticsGatheringStatus); Mockito.when(statisticsGatheringStatus.getSnapshotGatheringStatusEnd()).thenReturn(snapshotGatheringStatusEnd); Mockito.when(snapshotGatheringStatusEnd.isSucceeded()).thenReturn(true); diff --git a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java index fa0fcbf38d..54609323e4 100644 --- a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java +++ b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java @@ -53,7 +53,7 @@ public class SyncReactorGuardDecoratorTest { final Node operationalNode = Mockito.mock(Node.class); Mockito.when(operationalNode.getId()).thenReturn(NODE_ID); - Mockito.when(operationalNode.getAugmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode); + Mockito.when(operationalNode.augmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode); } @Test diff --git a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java index dae539f259..379eb257b8 100644 --- a/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java +++ b/applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java @@ -113,7 +113,7 @@ public class ReconcileUtilTest { Assert.assertEquals(1, plan.size()); Assert.assertEquals(1, plan.get(0).getItemsToPush().size()); - Assert.assertEquals(4L, plan.get(0).getItemsToPush().iterator().next().getKey() + Assert.assertEquals(4L, plan.get(0).getItemsToPush().iterator().next().key() .getGroupId().getValue().longValue()); Assert.assertEquals(0, plan.get(0).getItemsToUpdate().size()); } @@ -137,17 +137,17 @@ public class ReconcileUtilTest { Assert.assertEquals(3, plan.size()); Assert.assertEquals(1, plan.get(0).getItemsToPush().size()); - Assert.assertEquals(2L, plan.get(0).getItemsToPush().iterator().next().getKey() + Assert.assertEquals(2L, plan.get(0).getItemsToPush().iterator().next().key() .getGroupId().getValue().longValue()); Assert.assertEquals(0, plan.get(0).getItemsToUpdate().size()); Assert.assertEquals(1, plan.get(1).getItemsToPush().size()); - Assert.assertEquals(4L, plan.get(1).getItemsToPush().iterator().next().getKey() + Assert.assertEquals(4L, plan.get(1).getItemsToPush().iterator().next().key() .getGroupId().getValue().longValue()); Assert.assertEquals(0, plan.get(1).getItemsToUpdate().size()); Assert.assertEquals(1, plan.get(2).getItemsToPush().size()); - Assert.assertEquals(3L, plan.get(2).getItemsToPush().iterator().next().getKey() + Assert.assertEquals(3L, plan.get(2).getItemsToPush().iterator().next().key() .getGroupId().getValue().longValue()); Assert.assertEquals(0, plan.get(2).getItemsToUpdate().size()); } diff --git a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java index f854f05408..755fb29ceb 100644 --- a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java +++ b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java @@ -59,7 +59,7 @@ public class FlowTableStatNotificationSupplierImpl extends Preconditions.checkArgument(path != null); final FlowTableAndStatisticsMapBuilder ftsmBuilder = new FlowTableAndStatisticsMapBuilder(flowTableStatistics); - ftsmBuilder.setKey(new FlowTableAndStatisticsMapKey( + ftsmBuilder.withKey(new FlowTableAndStatisticsMapKey( new TableId(path.firstKeyOf(Table.class, TableKey.class).getId()))); final FlowTableStatisticsUpdateBuilder builder = new FlowTableStatisticsUpdateBuilder(); diff --git a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java index c2f7fd01cf..c12b9b9833 100644 --- a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java +++ b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java @@ -59,7 +59,7 @@ public class NodeConnectorStatNotificationSupplierImpl extends final NodeConnectorBuilder ncBuilder = new NodeConnectorBuilder(); final NodeConnectorKey ncKey = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class); ncBuilder.setId(ncKey.getId()); - ncBuilder.setKey(ncKey); + ncBuilder.withKey(ncKey); final NodeConnectorStatisticsUpdateBuilder builder = new NodeConnectorStatisticsUpdateBuilder(); builder.setId(getNodeId(path)); diff --git a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java index b5295298a6..67c27cd732 100644 --- a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java +++ b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java @@ -61,7 +61,7 @@ public class QueueStatNotificationSupplierImpl extends final NodeConnectorBuilder connBuilder = new NodeConnectorBuilder(); final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class); connBuilder.setId(key.getId()); - connBuilder.setKey(key); + connBuilder.withKey(key); final QueueIdAndStatisticsMapBuilder queueStatMapBuilder = new QueueIdAndStatisticsMapBuilder( statisticsDataTreeItem.getFlowCapableNodeConnectorQueueStatistics()); diff --git a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/AdminReconciliationServiceImpl.java b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/AdminReconciliationServiceImpl.java index 7d721a54da..d381c39608 100644 --- a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/AdminReconciliationServiceImpl.java +++ b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/AdminReconciliationServiceImpl.java @@ -141,7 +141,7 @@ public class AdminReconciliationServiceImpl implements AdminReconciliationServic ReadWriteTransaction tx = broker.newReadWriteTransaction(); Optional optional = readReconcileCounterFromDS(tx, instanceIdentifier, nodeId); ReconcileCounterBuilder counterBuilder = new ReconcileCounterBuilder() - .setKey(new ReconcileCounterKey(nodeId)).setNodeId(nodeId) + .withKey(new ReconcileCounterKey(nodeId)).setNodeId(nodeId) .setLastRequestTime(LocalDateTime.now().toString()); if (reconcileState) { counterBuilder.setSuccessCount(startCount); diff --git a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java index 31810a95f0..69f46ed7b7 100644 --- a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java +++ b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java @@ -56,9 +56,9 @@ public final class ShellUtil { for (Node node : nodes) { String[] nodeId = node.getId().getValue().split(":"); String name = null; - FlowCapableNode flowCapableNode = node.getAugmentation(FlowCapableNode.class); + FlowCapableNode flowCapableNode = node.augmentation(FlowCapableNode.class); if (flowCapableNode != null) { - name = node.getAugmentation(FlowCapableNode.class).getDescription(); + name = node.augmentation(FlowCapableNode.class).getDescription(); } else { LOG.error("Error while converting OFNode: {} to FlowCapableNode", node.getId()); return Collections.emptyList(); @@ -106,9 +106,9 @@ public final class ShellUtil { String name = null; List nodeConnectors = null; List portList = new ArrayList<>(); - FlowCapableNode flowCapableNode = node.getAugmentation(FlowCapableNode.class); + FlowCapableNode flowCapableNode = node.augmentation(FlowCapableNode.class); if (flowCapableNode != null) { - name = node.getAugmentation(FlowCapableNode.class).getDescription(); + name = node.augmentation(FlowCapableNode.class).getDescription(); } else { LOG.error("Error while converting OFNode:{} to FlowCapableNode: {}", node.getId()); return null; @@ -116,7 +116,7 @@ public final class ShellUtil { nodeConnectors = node.getNodeConnector(); for (NodeConnector nodeConnector : nodeConnectors) { FlowCapableNodeConnector flowCapableNodeConnector = - nodeConnector.getAugmentation(FlowCapableNodeConnector.class); + nodeConnector.augmentation(FlowCapableNodeConnector.class); if (flowCapableNodeConnector == null) { LOG.error("Error for OFNode:{} while reading nodeConnectors {}", node.getId()); return null; diff --git a/applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java b/applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java index 356822c55c..ffa6baf02a 100644 --- a/applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java +++ b/applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java @@ -127,7 +127,7 @@ public class LLDPPacketPuntEnforcer implements AutoCloseable, ClusteredDataTreeC flowBuilder.setFlags(new FlowModFlags(false, false, false, false, true)); flowBuilder.setId(new FlowId("12")); flowBuilder.setTableId(TABLE_ID); - flowBuilder.setKey(key); + flowBuilder.withKey(key); flowBuilder.setFlowName(LLDP_PUNT_WHOLE_PACKET_FLOW); return flowBuilder.build(); @@ -143,7 +143,7 @@ public class LLDPPacketPuntEnforcer implements AutoCloseable, ClusteredDataTreeC output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -153,7 +153,7 @@ public class LLDPPacketPuntEnforcer implements AutoCloseable, ClusteredDataTreeC InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions InstructionsBuilder isb = new InstructionsBuilder(); diff --git a/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java b/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java index 8f07c1b06a..fd0b1bc42e 100644 --- a/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java +++ b/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java @@ -58,7 +58,7 @@ public class FlowCapableTopologyProvider implements AutoCloseable { if (!isFlowTopologyExist(path)) { transactionChainManager.writeToTransaction(LogicalDatastoreType.OPERATIONAL, path, - new TopologyBuilder().setKey(key).build(), true); + new TopologyBuilder().withKey(key).build(), true); transactionChainManager.submitTransaction(); } diff --git a/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/TopologyManagerUtil.java b/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/TopologyManagerUtil.java index 3a37d3e18e..d2577e25df 100644 --- a/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/TopologyManagerUtil.java +++ b/applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/TopologyManagerUtil.java @@ -89,7 +89,7 @@ final class TopologyManagerUtil { } static InstanceIdentifier linkPath(final Link link, final InstanceIdentifier topology) { - return topology.child(Link.class, link.getKey()); + return topology.child(Link.class, link.key()); } diff --git a/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java b/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java index c2ef7a754a..fa6a2b284e 100644 --- a/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java +++ b/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java @@ -58,7 +58,7 @@ public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase { public void testOnNodeRemoved() { NodeKey topoNodeKey = new NodeKey(new NodeId("node1")); final InstanceIdentifier topoNodeII = topologyIID.child(Node.class, topoNodeKey); - Node topoNode = new NodeBuilder().setKey(topoNodeKey).build(); + Node topoNode = new NodeBuilder().withKey(topoNodeKey).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819 .nodes.NodeKey nodeKey = newInvNodeKey(topoNodeKey.getNodeId().getValue()); @@ -73,8 +73,8 @@ public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase { final Topology topology = new TopologyBuilder().setLink(linkList).build(); final InstanceIdentifier[] expDeletedIIDs = { - topologyIID.child(Link.class, linkList.get(0).getKey()), - topologyIID.child(Link.class, linkList.get(1).getKey()), + topologyIID.child(Link.class, linkList.get(0).key()), + topologyIID.child(Link.class, linkList.get(1).key()), topologyIID.child(Node.class, new NodeKey(new NodeId("node1"))) }; @@ -119,7 +119,7 @@ public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase { NodeKey topoNodeKey = new NodeKey(new NodeId("node1")); InstanceIdentifier topoNodeII = topologyIID.child(Node.class, topoNodeKey); - Node topoNode = new NodeBuilder().setKey(topoNodeKey).build(); + Node topoNode = new NodeBuilder().withKey(topoNodeKey).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey nodeKey = newInvNodeKey(topoNodeKey.getNodeId().getValue()); @@ -181,7 +181,7 @@ public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase { verify(mockTx).merge(eq(LogicalDatastoreType.OPERATIONAL), eq(topologyIID.child(Node.class, new NodeKey(expNodeId))), mergedNode.capture(), eq(true)); assertEquals("getNodeId", expNodeId, mergedNode.getValue().getNodeId()); - InventoryNode augmentation = mergedNode.getValue().getAugmentation(InventoryNode.class); + InventoryNode augmentation = mergedNode.getValue().augmentation(InventoryNode.class); assertNotNull("Missing augmentation", augmentation); assertEquals("getInventoryNodeRef", new NodeRef(invNodeID), augmentation.getInventoryNodeRef()); } diff --git a/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java b/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java index 72979c9161..c13514fe21 100644 --- a/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java +++ b/applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java @@ -67,7 +67,7 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen TerminationPointKey terminationPointKey = new TerminationPointKey(new TpId("tp1")); final InstanceIdentifier topoNodeII = topologyIID.child(Node.class, topoNodeKey); - Node topoNode = new NodeBuilder().setKey(topoNodeKey).build(); + Node topoNode = new NodeBuilder().withKey(topoNodeKey).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes .NodeKey nodeKey = newInvNodeKey(topoNodeKey.getNodeId().getValue()); @@ -84,8 +84,8 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen final Topology topology = new TopologyBuilder().setLink(linkList).build(); final InstanceIdentifier[] expDeletedIIDs = { - topologyIID.child(Link.class, linkList.get(0).getKey()), - topologyIID.child(Link.class, linkList.get(1).getKey()), + topologyIID.child(Link.class, linkList.get(0).key()), + topologyIID.child(Link.class, linkList.get(1).key()), topologyIID.child(Node.class, new NodeKey(new NodeId("node1"))) .child(TerminationPoint.class, new TerminationPointKey(new TpId("tp1"))) }; @@ -133,7 +133,7 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen TerminationPointKey terminationPointKey = new TerminationPointKey(new TpId("tp1")); InstanceIdentifier topoNodeII = topologyIID.child(Node.class, topoNodeKey); - Node topoNode = new NodeBuilder().setKey(topoNodeKey).build(); + Node topoNode = new NodeBuilder().withKey(topoNodeKey).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey nodeKey = newInvNodeKey(topoNodeKey.getNodeId().getValue()); @@ -204,7 +204,7 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen verify(mockTx).merge(eq(LogicalDatastoreType.OPERATIONAL), eq(expTpPath), mergedNode.capture(), eq(true)); assertEquals("getTpId", expTpId, mergedNode.getValue().getTpId()); - InventoryNodeConnector augmentation = mergedNode.getValue().getAugmentation( + InventoryNodeConnector augmentation = mergedNode.getValue().augmentation( InventoryNodeConnector.class); assertNotNull("Missing augmentation", augmentation); assertEquals("getInventoryNodeConnectorRef", new NodeConnectorRef(invNodeConnID), @@ -253,7 +253,7 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen any(TerminationPoint.class), eq(true)); assertDeletedIDs(new InstanceIdentifier[]{topologyIID.child(Link.class, - linkList.get(0).getKey())}, deletedLinkIDs); + linkList.get(0).key())}, deletedLinkIDs); } @SuppressWarnings("rawtypes") @@ -298,6 +298,6 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen any(TerminationPoint.class), eq(true)); assertDeletedIDs(new InstanceIdentifier[]{topologyIID.child(Link.class, - linkList.get(0).getKey())}, deletedLinkIDs); + linkList.get(0).key())}, deletedLinkIDs); } } diff --git a/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingLooseResolver.java b/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingLooseResolver.java index 627fd5f613..bb1fc0da6c 100644 --- a/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingLooseResolver.java +++ b/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingLooseResolver.java @@ -87,7 +87,7 @@ public class GroupingLooseResolver { for (Class> cls : classes) { Augmentation potential = guessData - .getAugmentation((Class>) cls); + .augmentation((Class>) cls); if (potential != null) { return Optional.of((G) potential); } diff --git a/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingResolver.java b/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingResolver.java index f4d379d437..a8191947be 100644 --- a/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingResolver.java +++ b/extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingResolver.java @@ -68,7 +68,7 @@ public class GroupingResolver> { @SuppressWarnings("unchecked") public Optional getExtension(T data) { for (Class> cls : classes) { - Augmentation potential = data.getAugmentation(cls); + Augmentation potential = data.augmentation(cls); if (potential != null) { return Optional.of((G) potential); } diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java index 8f9c4cd182..16b5ad4902 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java @@ -64,7 +64,7 @@ public class ArpOpConvertorTest { nxAugMatchRpcAddFlowBuilder.setNxmOfArpOp(nxmOfArpOpBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); final MatchEntry converted = arpOpConvertor.convert(extension); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java index 5f70f50f72..572af61937 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java @@ -61,7 +61,7 @@ public class ArpShaConvertorTest { .setNxmNxArpSha(nxmNxArpShaBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); arpShaConvertor = new ArpShaConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java index c4d3033223..d862b0b2ad 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java @@ -63,7 +63,7 @@ public class ArpSpaConvertorTest { nxAugMatchRpcAddFlowBuilder.setNxmOfArpSpa(nxmOfArpSpaBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); final MatchEntry converted = arpSpaConvertor.convert(extension); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java index 13520a1923..7e13f66cbc 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java @@ -58,7 +58,7 @@ public class ArpThaConvertorTest { .setNxmNxArpTha(nxArpThaBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); arpThaConvertor = new ArpThaConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java index add196126c..2627186e27 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java @@ -59,7 +59,7 @@ public class ArpTpaConvertorTest { nxAugMatchRpcAddFlowBuilder.setNxmOfArpTpa(nxmOfArpTpaBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); arpTpaConvertor = new ArpTpaConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java index a4b3a3fd20..5e6f651aa4 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java @@ -57,7 +57,7 @@ public class CtStateConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtState(nxmNxCtStateBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); ctStateConvertor = new CtStateConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java index fbf720f7b0..91a5c39186 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java @@ -56,7 +56,7 @@ public class CtZoneConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtZone(nxmNxCtZoneBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); ctZoneConvertor = new CtZoneConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java index fbc693beae..f9c1a8c985 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java @@ -59,7 +59,7 @@ public class EthDstConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthDst(nxmOfEthDstBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); ethDstConvertor = new EthDstConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java index 23bb8c9127..7c1461a380 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java @@ -58,7 +58,7 @@ public class EthSrcConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthSrc(nxmOfEthSrcBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); ethSrcConvertor = new EthSrcConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java index 6a4e7556d5..6e4e3a37f2 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java @@ -56,7 +56,7 @@ public class EthTypeConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthType(nxmOfEthTypeBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); ethTypeConvertor = new EthTypeConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java index 111d205a75..9ad530879d 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java @@ -55,7 +55,7 @@ public class Nshc1ConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc1(nxmNxNshc1Builder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nshc1Convertor = new Nshc1Convertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java index 26fcc44113..f6ecfac893 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java @@ -54,7 +54,7 @@ public class Nshc2ConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc2(nxmNxNshc2Builder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nshc2Convertor = new Nshc2Convertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java index ecf8c2f852..1a42de53b7 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java @@ -55,7 +55,7 @@ public class Nshc3ConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc3(nxmNxNshc3Builder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nshc3Convertor = new Nshc3Convertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java index 4a6de9e457..e0a7c4c918 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java @@ -54,7 +54,7 @@ public class Nshc4ConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc4(nxmNxNshc4Builder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nshc4Convertor = new Nshc4Convertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java index 55cf9af277..266345731c 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java @@ -54,7 +54,7 @@ public class NsiConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNsi(nxmNxNsiBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nsiConvertor = new NsiConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java index f52fceb926..3fe727fb8f 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java @@ -54,7 +54,7 @@ public class NspConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNsp(nxmNxNspBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); nspConvertor = new NspConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java index 8b0f7ed053..ea49b245a7 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java @@ -58,7 +58,7 @@ public class TcpDstConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpDst(nxmOfTcpDstBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); tcpDstConvertor = new TcpDstConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java index 6bee196ea1..3cb536215a 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java @@ -58,7 +58,7 @@ public class TcpSrcConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpSrc(nxmOfTcpSrcBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); tcpSrcConvertor = new TcpSrcConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java index 7f8a48e465..12e6ec2a41 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java @@ -58,7 +58,7 @@ public class TunIPv4DstConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Dst(nxmNxTunIpv4DstBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); tunIPv4DstConvertor = new TunIPv4DstConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java index ccfd790f84..bd370c1ef1 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java @@ -58,7 +58,7 @@ public class TunIPv4SrcConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Src(nxmNxTunIpv4SrcBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); tunIPv4DstConvertor = new TunIPv4SrcConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java index 1a1cb6c0d4..4fde6b6173 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java @@ -55,7 +55,7 @@ public class TunIdConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunId(nxmNxTunIdBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); tunIdConvertor = new TunIdConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java index 9eeae22d98..08b8734900 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java @@ -58,7 +58,7 @@ public class UdpDstConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpDst(nxmOfUdpDstBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); udpDstConvertor = new UdpDstConvertor(); diff --git a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java index a4bd524d4f..ed5e149de2 100644 --- a/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java +++ b/extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java @@ -58,7 +58,7 @@ public class UdpSrcConvertorTest { nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpSrc(nxmOfUdpSrcBuilder.build()); final Augmentation extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build(); - when(extension.getAugmentation(Matchers.>>any())) + when(extension.augmentation(Matchers.>>any())) .thenReturn(extensionAugmentation); udpSrcConvertor = new UdpSrcConvertor(); diff --git a/extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/OnfExperimenterErrorFactoryTest.java b/extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/OnfExperimenterErrorFactoryTest.java index 788d5ac675..1cbc9d5ea7 100644 --- a/extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/OnfExperimenterErrorFactoryTest.java +++ b/extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/OnfExperimenterErrorFactoryTest.java @@ -38,7 +38,7 @@ public class OnfExperimenterErrorFactoryTest { Assert.assertEquals("Wrong type", EncodeConstants.EXPERIMENTER_VALUE, builtByFactory.getType().intValue()); Assert.assertEquals("Wrong type string", "EXPERIMENTER", builtByFactory.getTypeString()); Assert.assertEquals("Wrong experimenter ID", EncodeConstants.ONF_EXPERIMENTER_ID, - builtByFactory.getAugmentation(ExperimenterIdError.class).getExperimenter().getValue().intValue()); + builtByFactory.augmentation(ExperimenterIdError.class).getExperimenter().getValue().intValue()); Assert.assertNotNull("Data is null", builtByFactory.getData()); } diff --git a/extension/test-extension/src/main/java/org/opendaylight/openflowplugin/extension/test/Test.java b/extension/test-extension/src/main/java/org/opendaylight/openflowplugin/extension/test/Test.java index 3be3103914..04f3592837 100644 --- a/extension/test-extension/src/main/java/org/opendaylight/openflowplugin/extension/test/Test.java +++ b/extension/test-extension/src/main/java/org/opendaylight/openflowplugin/extension/test/Test.java @@ -142,14 +142,14 @@ public class Test implements TestService { // Wrap our Apply Action in an Instruction InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instructions InstructionsBuilder isb = new InstructionsBuilder(); List instructions = new ArrayList<>(); instructions.add(ib.build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); isb.setInstruction(instructions); return isb; } @@ -159,7 +159,7 @@ public class Test implements TestService { DecNwTtl decNwTtl = ta.build(); ActionBuilder ab = new ActionBuilder(); ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build()); - ab.setKey(new ActionKey(actionKeyVal)); + ab.withKey(new ActionKey(actionKeyVal)); return ab; } @@ -179,7 +179,7 @@ public class Test implements TestService { // base part ActionBuilder abExt = new ActionBuilder(); - abExt.setKey(new ActionKey(actionKeyVal)); + abExt.withKey(new ActionKey(actionKeyVal)); abExt.setAction(topNxActionCaseBld.build()); return abExt; } diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java index edf379aa2e..9b59029469 100755 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java @@ -86,7 +86,7 @@ public class MeterModInputMessageFactory implements OFSerializer, MeterBandExperimenterCase experimenterBandCase = (MeterBandExperimenterCase) meterBand; MeterBandExperimenter experimenterBand = experimenterBandCase.getMeterBandExperimenter(); ExperimenterIdMeterBand expIdMeterBand = - experimenterBand.getAugmentation(ExperimenterIdMeterBand.class); + experimenterBand.augmentation(ExperimenterIdMeterBand.class); if (expIdMeterBand != null) { long expId = expIdMeterBand.getExperimenter().getValue(); Class meterBandSubType = expIdMeterBand.getSubType(); diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java index 16d24ef179..6c8c87f10b 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java @@ -301,7 +301,7 @@ public class MultipartReplyMessageFactory implements OFSerializer serializer = registry.getSerializer(ExperimenterSerializerKeyFactory .createMultipartRequestTFSerializerKey(EncodeConstants.OF13_VERSION_ID, expId)); serializer.serialize(property, output); @@ -313,7 +313,7 @@ public class MultipartReplyMessageFactory implements OFSerializer entries = property.getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry(); + List entries = property.augmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry(); if (entries != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID); @@ -330,7 +330,7 @@ public class MultipartReplyMessageFactory implements OFSerializer actions = property.getAugmentation(ActionRelatedTableFeatureProperty.class).getAction(); + List actions = property.augmentation(ActionRelatedTableFeatureProperty.class).getAction(); if (actions != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory.createActionKeyMaker(EncodeConstants.OF13_VERSION_ID); ListSerializer.serializeHeaderList(actions, keyMaker, registry, output); @@ -346,7 +346,7 @@ public class MultipartReplyMessageFactory implements OFSerializer nextTableIds = property.getAugmentation(NextTableRelatedTableFeatureProperty.class) + List nextTableIds = property.augmentation(NextTableRelatedTableFeatureProperty.class) .getNextTableIds(); if (nextTableIds != null) { for (NextTableIds next : nextTableIds) { @@ -364,7 +364,7 @@ public class MultipartReplyMessageFactory implements OFSerializer instructions = property.getAugmentation(InstructionRelatedTableFeatureProperty.class) + List instructions = property.augmentation(InstructionRelatedTableFeatureProperty.class) .getInstruction(); if (instructions != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java index 1a7a115bb9..cdbd12d710 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java @@ -325,7 +325,7 @@ public class MultipartRequestInputFactory implements OFSerializer instructions = property.getAugmentation( + List instructions = property.augmentation( InstructionRelatedTableFeatureProperty.class).getInstruction(); if (instructions != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory @@ -343,7 +343,7 @@ public class MultipartRequestInputFactory implements OFSerializer nextTableIds = property.getAugmentation( + List nextTableIds = property.augmentation( NextTableRelatedTableFeatureProperty.class).getNextTableIds(); if (nextTableIds != null) { for (NextTableIds next : nextTableIds) { @@ -370,7 +370,7 @@ public class MultipartRequestInputFactory implements OFSerializer actions = property.getAugmentation(ActionRelatedTableFeatureProperty.class).getAction(); + List actions = property.augmentation(ActionRelatedTableFeatureProperty.class).getAction(); if (actions != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory .createActionKeyMaker(EncodeConstants.OF13_VERSION_ID); @@ -387,7 +387,7 @@ public class MultipartRequestInputFactory implements OFSerializer entries = property.getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry(); + List entries = property.augmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry(); if (entries != null) { TypeKeyMaker keyMaker = TypeKeyMakerFactory .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID); @@ -400,7 +400,7 @@ public class MultipartRequestInputFactory implements OFSerializer serializer = registry.getSerializer( ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey( EncodeConstants.OF13_VERSION_ID, expId)); diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactory.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactory.java index db0d2e3d30..b1ecb6638d 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactory.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactory.java @@ -48,7 +48,7 @@ public class OF10QueueGetConfigReplyMessageFactory implements OFSerializer tableIds = property.getAugmentation(NextTableRelatedTableFeatureProperty.class) + List tableIds = property.augmentation(NextTableRelatedTableFeatureProperty.class) .getNextTableIds(); Assert.assertEquals("Wrong next table id size", 4, tableIds.size()); Assert.assertEquals("Wrong next table id", 1, tableIds.get(0).getTableId().intValue()); @@ -165,7 +165,7 @@ public class MultipartReplyTableFeaturesTest { property = feature.getTableFeatureProperties().get(3); Assert.assertEquals("Wrong property type", TableFeaturesPropType.OFPTFPTNEXTTABLESMISS, property.getType()); - tableIds = property.getAugmentation(NextTableRelatedTableFeatureProperty.class) + tableIds = property.augmentation(NextTableRelatedTableFeatureProperty.class) .getNextTableIds(); Assert.assertEquals("Wrong next table id size", 3, tableIds.size()); Assert.assertEquals("Wrong next table id", 5, tableIds.get(0).getTableId().intValue()); diff --git a/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java b/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java index da8646bd39..4badfd94b7 100644 --- a/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java +++ b/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java @@ -71,7 +71,7 @@ public class OF10QueueGetConfigReplyMessageFactoryTest { serializedBuffer.readShort()); Assert.assertEquals("Wrong property length", 16, serializedBuffer.readShort()); serializedBuffer.skipBytes(4); - RateQueueProperty rateQueueProperty = properties.get(0).getAugmentation(RateQueueProperty.class); + RateQueueProperty rateQueueProperty = properties.get(0).augmentation(RateQueueProperty.class); Assert.assertEquals("Wrong rate", rateQueueProperty.getRate().intValue(), serializedBuffer.readShort()); serializedBuffer.skipBytes(6); } diff --git a/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactoryTest.java b/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactoryTest.java index cac11f9551..c382b5b228 100644 --- a/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactoryTest.java +++ b/openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactoryTest.java @@ -78,7 +78,7 @@ public class QueueGetConfigReplyMessageFactoryTest { serializedBuffer.readShort()); Assert.assertEquals("Wrong property length", 16, serializedBuffer.readShort()); serializedBuffer.skipBytes(PROPERTY_HEADER_PADDING); - RateQueueProperty rateQueueProperty = properties.get(0).getAugmentation(RateQueueProperty.class); + RateQueueProperty rateQueueProperty = properties.get(0).augmentation(RateQueueProperty.class); Assert.assertEquals("Wrong rate", rateQueueProperty.getRate().intValue(), serializedBuffer.readShort()); serializedBuffer.skipBytes(PROPERTY_RATE_PADDING); @@ -93,7 +93,7 @@ public class QueueGetConfigReplyMessageFactoryTest { serializedBuffer.readShort()); Assert.assertEquals("Wrong property length", 16, serializedBuffer.readShort()); serializedBuffer.skipBytes(PROPERTY_HEADER_PADDING); - RateQueueProperty rateQueuePropertyTwo = propertiesTwo.get(0).getAugmentation(RateQueueProperty.class); + RateQueueProperty rateQueuePropertyTwo = propertiesTwo.get(0).augmentation(RateQueueProperty.class); Assert.assertEquals("Wrong rate", rateQueuePropertyTwo.getRate().intValue(), serializedBuffer.readShort()); serializedBuffer.skipBytes(PROPERTY_RATE_PADDING); diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java index 8470f299d1..8ab3bbe2a4 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java @@ -305,7 +305,7 @@ public final class MultipartReplyTranslatorUtil { } statsBuilder.setDuration(durationBuilder.build()); statsBuilder.setCollisionCount(portStats.getCollisions()); - statsBuilder.setKey(new NodeConnectorStatisticsAndPortNumberMapKey(statsBuilder.getNodeConnectorId())); + statsBuilder.withKey(new NodeConnectorStatisticsAndPortNumberMapKey(statsBuilder.getNodeConnectorId())); statsBuilder.setReceiveCrcError(portStats.getRxCrcErr()); statsBuilder.setReceiveDrops(portStats.getRxDropped()); statsBuilder.setReceiveErrors(portStats.getRxErrors()); diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java index 1adf381f77..02e7c4060d 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java @@ -169,7 +169,7 @@ public class OpenFlowProviderConfigImpl implements OpenflowProviderConfig { @Override public > E getAugmentation( + .openflow.provider.config.rev160510.OpenflowProviderConfig>> E augmentation( java.lang.Class augmentationType) { return null; } diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java index 528601939c..fa5dad912b 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java @@ -75,7 +75,7 @@ public class FlowStatsMultipartWriter extends AbstractMultipartWriter, Des } instructions.add(new InstructionBuilder() - .setKey(new InstructionKey(offset)) + .withKey(new InstructionKey(offset)) .setOrder(offset) .setInstruction(deserializer.deserialize(message)) .build()); diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/GroupMessageDeserializer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/GroupMessageDeserializer.java index 36efc59854..73d1986cb2 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/GroupMessageDeserializer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/GroupMessageDeserializer.java @@ -76,7 +76,7 @@ public class GroupMessageDeserializer implements OFDeserializer, D while (message.readerIndex() - startIndex < bucketLength) { actions.add(new ActionBuilder() - .setKey(new ActionKey(offset)) + .withKey(new ActionKey(offset)) .setOrder(offset) .setAction(ActionUtil.readAction(EncodeConstants.OF13_VERSION_ID, message, registry, ActionPath.GROUP_DESC_STATS_UPDATED_BUCKET_ACTION)) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java index adfec1d1e8..694ab0beff 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java @@ -101,7 +101,7 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer subItems = new ArrayList<>(); int actualLength = GROUP_DESC_HEADER_LENGTH; @@ -65,7 +65,7 @@ public class MultipartReplyGroupDescDeserializer implements OFDeserializer processHeader(message) - .setKey(new SetFieldMatchKey(clazz)) + .withKey(new SetFieldMatchKey(clazz)) .setMatchType(clazz) .build()); } diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java index e658c40a5b..a11f19e6d3 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java @@ -301,7 +301,7 @@ public class FlowMessageSerializer extends AbstractMessageSerializer iiToTable = instanceIdentifier - .child(Table.class, tableData.getKey()); + .child(Table.class, tableData.key()); txFacade.writeToTransaction(LogicalDatastoreType.OPERATIONAL, iiToTable, table); } } diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/NodeConnectorStatisticsToNotificationTransformer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/NodeConnectorStatisticsToNotificationTransformer.java index d59baeadc1..a4a8605580 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/NodeConnectorStatisticsToNotificationTransformer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/NodeConnectorStatisticsToNotificationTransformer.java @@ -101,7 +101,7 @@ public final class NodeConnectorStatisticsToNotificationTransformer { } statsBuilder.setDuration(durationBuilder.build()); statsBuilder.setCollisionCount(portStats.getCollisions()); - statsBuilder.setKey(new NodeConnectorStatisticsAndPortNumberMapKey(statsBuilder.getNodeConnectorId())); + statsBuilder.withKey(new NodeConnectorStatisticsAndPortNumberMapKey(statsBuilder.getNodeConnectorId())); statsBuilder.setReceiveCrcError(portStats.getRxCrcErr()); statsBuilder.setReceiveDrops(portStats.getRxDropped()); statsBuilder.setReceiveErrors(portStats.getRxErrors()); diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java index 624a18566e..6aa039669f 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java @@ -65,7 +65,7 @@ public class FlowDirectStatisticsService extends AbstractFlowDirectStatisticsSer for (final FlowAndStatisticsMapList part : flowAndStatisticsMapLists) { final FlowId flowId = new FlowId(generateFlowId(part).getValue()); statsList.add(new FlowAndStatisticsMapListBuilder(part) - .setKey(new FlowAndStatisticsMapListKey(flowId)) + .withKey(new FlowAndStatisticsMapListKey(flowId)) .setFlowId(flowId) .build()); } diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/PortDirectStatisticsService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/PortDirectStatisticsService.java index 61b4727254..5d6b5aa483 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/PortDirectStatisticsService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/PortDirectStatisticsService.java @@ -86,7 +86,7 @@ public class PortDirectStatisticsService extends AbstractPortDirectStatisticsSer .setNodeConnectorId(nodeConnectorId) .setDuration(durationBuilder.build()) .setCollisionCount(portStats.getCollisions()) - .setKey(new NodeConnectorStatisticsAndPortNumberMapKey(nodeConnectorId)) + .withKey(new NodeConnectorStatisticsAndPortNumberMapKey(nodeConnectorId)) .setReceiveCrcError(portStats.getRxCrcErr()).setReceiveDrops(portStats.getRxDropped()) .setReceiveErrors(portStats.getRxErrors()) .setReceiveFrameError(portStats.getRxFrameErr()) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsService.java index ee4fc5f725..5b40896a9e 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsService.java @@ -66,7 +66,7 @@ public class QueueDirectStatisticsService extends AbstractQueueDirectStatisticsS getDatapathId(), queueStats.getPortNo(), getOfVersion()); final QueueIdAndStatisticsMapBuilder statsBuilder = new QueueIdAndStatisticsMapBuilder() - .setKey(new QueueIdAndStatisticsMapKey(nodeConnectorId, queueId)) + .withKey(new QueueIdAndStatisticsMapKey(nodeConnectorId, queueId)) .setNodeConnectorId(nodeConnectorId) .setTransmissionErrors(new Counter64(queueStats.getTxErrors())) .setTransmittedBytes(new Counter64(queueStats.getTxBytes())) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java index 79a57adfaa..e761e829d4 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java @@ -50,7 +50,7 @@ public class FlowDirectStatisticsService extends AbstractFlowDirectStatisticsSer .map(flowAndStatisticsMapList -> { final FlowId flowId = new FlowId(generateFlowId(flowAndStatisticsMapList)); return new FlowAndStatisticsMapListBuilder(flowAndStatisticsMapList) - .setKey(new FlowAndStatisticsMapListKey(flowId)) + .withKey(new FlowAndStatisticsMapListKey(flowId)) .setFlowId(flowId) .build(); }) diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java index fc74907d8f..d77836c58b 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java @@ -66,159 +66,159 @@ public class TableFeaturesMatchFieldDeserializerTest { addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_OP); Optional fieldMatch = deserializer.deserialize(buffer); - assertEquals(ArpOp.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(ArpOp.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_SHA); fieldMatch = deserializer.deserialize(buffer); - assertEquals(ArpSha.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(ArpSha.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_SPA); fieldMatch = deserializer.deserialize(buffer); - assertEquals(ArpSpa.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(ArpSpa.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_THA); fieldMatch = deserializer.deserialize(buffer); - assertEquals(ArpTha.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(ArpTha.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_TPA); fieldMatch = deserializer.deserialize(buffer); - assertEquals(ArpTpa.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(ArpTpa.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ETH_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(EthDst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(EthDst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ETH_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(EthSrc.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(EthSrc.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ICMPV4_CODE); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Icmpv4Code.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Icmpv4Code.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ICMPV4_TYPE); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Icmpv4Type.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Icmpv4Type.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ICMPV6_CODE); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Icmpv6Code.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Icmpv6Code.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ICMPV6_TYPE); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Icmpv6Type.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Icmpv6Type.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IN_PHY_PORT); fieldMatch = deserializer.deserialize(buffer); - assertEquals(InPhyPort.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(InPhyPort.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IN_PORT); fieldMatch = deserializer.deserialize(buffer); - assertEquals(InPort.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(InPort.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IP_DSCP); fieldMatch = deserializer.deserialize(buffer); - assertEquals(IpDscp.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(IpDscp.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IP_ECN); fieldMatch = deserializer.deserialize(buffer); - assertEquals(IpEcn.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(IpEcn.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IP_PROTO); fieldMatch = deserializer.deserialize(buffer); - assertEquals(IpProto.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(IpProto.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV4_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv4Src.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv4Src.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV4_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv4Dst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv4Dst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6Src.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6Src.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6Dst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6Dst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_EXTHDR); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6Exthdr.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6Exthdr.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_FLABEL); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6Flabel.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6Flabel.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_ND_SLL); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6NdSll.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6NdSll.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_ND_TLL); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6NdTll.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6NdTll.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_ND_TARGET); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Ipv6NdTarget.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Ipv6NdTarget.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.METADATA); fieldMatch = deserializer.deserialize(buffer); - assertEquals(Metadata.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(Metadata.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.MPLS_BOS); fieldMatch = deserializer.deserialize(buffer); - assertEquals(MplsBos.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(MplsBos.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.MPLS_LABEL); fieldMatch = deserializer.deserialize(buffer); - assertEquals(MplsLabel.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(MplsLabel.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.MPLS_TC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(MplsTc.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(MplsTc.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.PBB_ISID); fieldMatch = deserializer.deserialize(buffer); - assertEquals(PbbIsid.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(PbbIsid.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.SCTP_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(SctpSrc.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(SctpSrc.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.SCTP_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(SctpDst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(SctpDst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.TCP_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(TcpSrc.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(TcpSrc.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.TCP_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(TcpDst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(TcpDst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.TUNNEL_ID); fieldMatch = deserializer.deserialize(buffer); - assertEquals(TunnelId.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(TunnelId.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.UDP_SRC); fieldMatch = deserializer.deserialize(buffer); - assertEquals(UdpSrc.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(UdpSrc.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.UDP_DST); fieldMatch = deserializer.deserialize(buffer); - assertEquals(UdpDst.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(UdpDst.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.VLAN_PCP); fieldMatch = deserializer.deserialize(buffer); - assertEquals(VlanPcp.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(VlanPcp.class, fieldMatch.get().key().getMatchType()); addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.VLAN_VID); fieldMatch = deserializer.deserialize(buffer); - assertEquals(VlanVid.class, fieldMatch.get().getKey().getMatchType()); + assertEquals(VlanVid.class, fieldMatch.get().key().getMatchType()); assertEquals(0, buffer.readableBytes()); } diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/ApplyActionsInstructionSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/ApplyActionsInstructionSerializerTest.java index d4e4d87e41..10c404c5f6 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/ApplyActionsInstructionSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/ApplyActionsInstructionSerializerTest.java @@ -39,7 +39,7 @@ public class ApplyActionsInstructionSerializerTest extends AbstractInstructionSe .setApplyActions(new ApplyActionsBuilder() .setAction(Collections.singletonList(new ActionBuilder() .setOrder(order) - .setKey(new ActionKey(order)) + .withKey(new ActionKey(order)) .setAction(new SetNwSrcActionCaseBuilder() .setSetNwSrcAction(new SetNwSrcActionBuilder() .setAddress(new Ipv4Builder() diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/WriteActionsInstructionSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/WriteActionsInstructionSerializerTest.java index bf2587f508..3cb9e2a319 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/WriteActionsInstructionSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/WriteActionsInstructionSerializerTest.java @@ -39,7 +39,7 @@ public class WriteActionsInstructionSerializerTest extends AbstractInstructionSe .setWriteActions(new WriteActionsBuilder() .setAction(Collections.singletonList(new ActionBuilder() .setOrder(order) - .setKey(new ActionKey(order)) + .withKey(new ActionKey(order)) .setAction(new SetNwSrcActionCaseBuilder() .setSetNwSrcAction(new SetNwSrcActionBuilder() .setAddress(new Ipv4Builder() diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializerTest.java index 04fccd1447..8dfbc076d0 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializerTest.java @@ -92,12 +92,12 @@ public class FlowMessageSerializerTest extends AbstractSerializerTest { .setInstruction(Arrays.asList( new InstructionBuilder() .setOrder(0) - .setKey(new InstructionKey(0)) + .withKey(new InstructionKey(0)) .setInstruction(new ApplyActionsCaseBuilder() .setApplyActions(new ApplyActionsBuilder() .setAction(Collections.singletonList(new ActionBuilder() .setOrder(0) - .setKey(new ActionKey(0)) + .withKey(new ActionKey(0)) .setAction(new SetVlanIdActionCaseBuilder() .setSetVlanIdAction(new SetVlanIdActionBuilder() .setVlanId(new VlanId(VLAN_ID)) @@ -109,12 +109,12 @@ public class FlowMessageSerializerTest extends AbstractSerializerTest { .build(), new InstructionBuilder() .setOrder(2) - .setKey(new InstructionKey(2)) + .withKey(new InstructionKey(2)) .setInstruction(new ApplyActionsCaseBuilder() .setApplyActions(new ApplyActionsBuilder() .setAction(Collections.singletonList(new ActionBuilder() .setOrder(0) - .setKey(new ActionKey(0)) + .withKey(new ActionKey(0)) .setAction(new SetTpDstActionCaseBuilder() .setSetTpDstAction(new SetTpDstActionBuilder() .setIpProtocol(IP_PROTOCOL) @@ -127,12 +127,12 @@ public class FlowMessageSerializerTest extends AbstractSerializerTest { .build(), new InstructionBuilder() .setOrder(1) - .setKey(new InstructionKey(1)) + .withKey(new InstructionKey(1)) .setInstruction(new ApplyActionsCaseBuilder() .setApplyActions(new ApplyActionsBuilder() .setAction(Collections.singletonList(new ActionBuilder() .setOrder(0) - .setKey(new ActionKey(0)) + .withKey(new ActionKey(0)) .setAction(new SetTpSrcActionCaseBuilder() .setSetTpSrcAction(new SetTpSrcActionBuilder() .setIpProtocol(IP_PROTOCOL) diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java index f092579cda..5250807445 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java @@ -70,14 +70,14 @@ public class GroupMessageSerializerTest extends AbstractSerializerTest { .build()) .build()) .setOrder(ACTION_ORDER) - .setKey(ACTION_KEY) + .withKey(ACTION_KEY) .build() ); private static final Buckets BUCKETS = new BucketsBuilder() .setBucket(Collections.singletonList(new BucketBuilder() .setBucketId(BUCKET_ID) - .setKey(BUCKET_KEY) + .withKey(BUCKET_KEY) .setWatchGroup(BUCKET_WATCH_GROUP) .setWatchPort(BUCKET_WATCH_PORT) .setWeight(BUCKET_WEIGHT) diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializerTest.java index d89f30c72e..4fddccaeeb 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializerTest.java @@ -59,7 +59,7 @@ public class MultipartRequestTableFeaturesSerializerTest extends AbstractSeriali .setTableProperties(new TablePropertiesBuilder() .setTableFeatureProperties(Collections.singletonList(new TableFeaturePropertiesBuilder() .setOrder(0) - .setKey(new TableFeaturePropertiesKey(0)) + .withKey(new TableFeaturePropertiesKey(0)) .setTableFeaturePropType(NEXT_TABLE) .build())) .build()) diff --git a/openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java b/openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java index e4ff8c1b41..ce2f247d30 100644 --- a/openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java +++ b/openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java @@ -270,7 +270,7 @@ public class OFPluginFlowTest { flow.setId(flowId); flow.setTableId(tableId); - flow.setKey(key); + flow.withKey(key); flow.setFlowName("Foo" + "X" + "f1"); return flow; @@ -297,7 +297,7 @@ public class OFPluginFlowTest { DecNwTtl decNwTtl = ta.build(); ActionBuilder ab = new ActionBuilder(); ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); // Add our drop action to a list List actionList = new ArrayList(); actionList.add(ab.build()); @@ -309,14 +309,14 @@ public class OFPluginFlowTest { // Wrap our Apply Action in an Instruction InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instructions InstructionsBuilder isb = new InstructionsBuilder(); List instructions = new ArrayList(); instructions.add(ib.build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); isb.setInstruction(instructions); return isb; } diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java index 9b26310f4f..5c69627baa 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java @@ -76,7 +76,7 @@ public final class MatchExtensionHelper { } final GeneralAugMatchNodesNodeTableFlowBuilder builder = Optional - .ofNullable(matchBuilder.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class)) + .ofNullable(matchBuilder.augmentation(GeneralAugMatchNodesNodeTableFlow.class)) .map(GeneralAugMatchNodesNodeTableFlowBuilder::new) .orElse(new GeneralAugMatchNodesNodeTableFlowBuilder().setExtensionList(new ArrayList<>())); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java index 9e76d28ad1..c82a569469 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java @@ -74,7 +74,7 @@ public class GroupDescStatsResponseConvertor extends Convertor, convertedSalActions.get()) { ActionBuilder wrappedAction = new ActionBuilder(); wrappedAction.setAction(action); - wrappedAction.setKey(new ActionKey(actionKey)); + wrappedAction.withKey(new ActionKey(actionKey)); wrappedAction.setOrder(actionKey); actions.add(wrappedAction.build()); actionKey++; @@ -90,7 +90,7 @@ public class GroupDescStatsResponseConvertor extends Convertor, bucketDesc.setWatchGroup(bucketDetails.getWatchGroup()); BucketId bucketId = new BucketId((long) bucketKey); bucketDesc.setBucketId(bucketId); - bucketDesc.setKey(new BucketKey(bucketId)); + bucketDesc.withKey(new BucketKey(bucketId)); bucketKey++; allBuckets.add(bucketDesc.build()); } @@ -114,7 +114,7 @@ public class GroupDescStatsResponseConvertor extends Convertor, salGroupDescStats.setBuckets(toSALBucketsDesc(groupDesc.getBucketsList(), data.getVersion())); salGroupDescStats.setGroupId(new GroupId(groupDesc.getGroupId().getValue())); salGroupDescStats.setGroupType(GroupTypes.forValue(groupDesc.getType().getIntValue())); - salGroupDescStats.setKey(new GroupDescStatsKey(salGroupDescStats.getGroupId())); + salGroupDescStats.withKey(new GroupDescStatsKey(salGroupDescStats.getGroupId())); convertedSALGroupsDesc.add(salGroupDescStats.build()); } diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java index 792492d4d4..8e7a0ecd73 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java @@ -63,7 +63,7 @@ public class GroupStatsResponseConvertor extends Convertor< bucketCounter.setByteCount(new Counter64(bucketStat.getByteCount())); bucketCounter.setPacketCount(new Counter64(bucketStat.getPacketCount())); BucketId bucketId = new BucketId((long) bucketKey); - bucketCounter.setKey(new BucketCounterKey(bucketId)); + bucketCounter.withKey(new BucketCounterKey(bucketId)); bucketCounter.setBucketId(bucketId); bucketKey++; allBucketStats.add(bucketCounter.build()); @@ -99,7 +99,7 @@ public class GroupStatsResponseConvertor extends Convertor< salGroupStats.setGroupId(new GroupId(groupStats.getGroupId().getValue())); salGroupStats.setPacketCount(new Counter64(groupStats.getPacketCount())); salGroupStats.setRefCount(new Counter32(groupStats.getRefCount())); - salGroupStats.setKey(new GroupStatsKey(salGroupStats.getGroupId())); + salGroupStats.withKey(new GroupStatsKey(salGroupStats.getGroupId())); convertedSALGroups.add(salGroupStats.build()); } diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java index 800b32661f..dbcdc32a36 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java @@ -68,7 +68,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor bands = meterConfig.getBands(); @@ -94,7 +94,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor allMeterBandStats = meterStats.getMeterBandStats(); @@ -89,7 +89,7 @@ public class MeterStatsResponseConvertor extends Convertor< bandStatBuilder.setByteBandCount(new Counter64(meterBandStats.getByteBandCount())); bandStatBuilder.setPacketBandCount(new Counter64(meterBandStats.getPacketBandCount())); BandId bandId = new BandId((long) bandKey); - bandStatBuilder.setKey(new BandStatKey(bandId)); + bandStatBuilder.withKey(new BandStatKey(bandId)); bandStatBuilder.setBandId(bandId); bandKey++; listAllBandStats.add(bandStatBuilder.build()); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java index b8a9fddbc2..da739a6784 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java @@ -460,7 +460,7 @@ public class TableFeaturesResponseConvertor for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731 .instructions.grouping.Instruction currInstruction : properties - .getAugmentation(InstructionRelatedTableFeatureProperty.class).getInstruction()) { + .augmentation(InstructionRelatedTableFeatureProperty.class).getInstruction()) { InstructionChoice currInstructionType = currInstruction.getInstructionChoice(); if (currInstructionType instanceof GotoTableCase) { @@ -500,7 +500,7 @@ public class TableFeaturesResponseConvertor } private static List setNextTableFeatureProperty(final TableFeatureProperties properties) { - return properties.getAugmentation(NextTableRelatedTableFeatureProperty.class) + return properties.augmentation(NextTableRelatedTableFeatureProperty.class) .getNextTableIds().stream().map(NextTableIds::getTableId).collect(Collectors.toList()); } @@ -511,7 +511,7 @@ public class TableFeaturesResponseConvertor int order = 0; for (Action action : properties - .getAugmentation(ActionRelatedTableFeatureProperty.class).getAction()) { + .augmentation(ActionRelatedTableFeatureProperty.class).getAction()) { if (action != null && null != action.getActionChoice()) { org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder actionBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action @@ -536,7 +536,7 @@ public class TableFeaturesResponseConvertor SetFieldMatchBuilder setFieldMatchBuilder = new SetFieldMatchBuilder(); // This handles only OpenflowBasicClass oxm class. - for (MatchEntry currMatch : properties.getAugmentation(OxmRelatedTableFeatureProperty.class) + for (MatchEntry currMatch : properties.augmentation(OxmRelatedTableFeatureProperty.class) .getMatchEntry()) { Class ofMatchField = currMatch.getOxmMatchField(); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java index a55570cca1..8f8ebe4c9b 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java @@ -511,7 +511,7 @@ public class FlowConvertor extends Convertor, Ve ActionBuilder actionBuilder = new ActionBuilder(); actionBuilder.setAction(injectedAction) - .setKey(actionItem.getKey()) + .withKey(actionItem.key()) .setOrder(actionItem.getOrder() + offset); targetActionList.add(actionBuilder.build()); @@ -540,7 +540,7 @@ public class FlowConvertor extends Convertor, Ve } instructionBuilder - .setKey(srcInstruction.getKey()) + .withKey(srcInstruction.key()) .setOrder(srcInstruction.getOrder()); targetInstructionList.add(instructionBuilder.build()); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorUtil.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorUtil.java index 58c1627a23..817b81bee1 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorUtil.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorUtil.java @@ -39,7 +39,7 @@ public final class FlowConvertorUtil { for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action action : actionList) { ActionBuilder wrappedAction = new ActionBuilder(); wrappedAction.setAction(action); - wrappedAction.setKey(new ActionKey(actionKey)); + wrappedAction.withKey(new ActionKey(actionKey)); wrappedAction.setOrder(actionKey); actions.add(wrappedAction.build()); actionKey++; diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowInstructionResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowInstructionResponseConvertor.java index 0d06b0183d..6691d75d2d 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowInstructionResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowInstructionResponseConvertor.java @@ -155,7 +155,7 @@ public final class FlowInstructionResponseConvertor extends Convertor< InstructionBuilder instBuilder = new InstructionBuilder(); instBuilder.setInstruction(salInstruction); - instBuilder.setKey(new InstructionKey(instructionTreeNodekey)); + instBuilder.withKey(new InstructionKey(instructionTreeNodekey)); instBuilder.setOrder(instructionTreeNodekey); instructionTreeNodekey++; salInstructionList.add(instBuilder.build()); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java index 951614ccf7..b061b9382d 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java @@ -85,7 +85,7 @@ public class FlowStatsResponseConvertor extends Convertor, List< InstructionBuilder instBuilder = new InstructionBuilder(); instBuilder.setInstruction(applyActionsCaseBuilder.build()); - instBuilder.setKey(new InstructionKey(0)); + instBuilder.withKey(new InstructionKey(0)); instBuilder.setOrder(0); List salInstructionList = new ArrayList<>(); salInstructionList.add(instBuilder.build()); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalExperimenterIdCase.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalExperimenterIdCase.java index 60a87ebe33..4cf16d443a 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalExperimenterIdCase.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalExperimenterIdCase.java @@ -34,7 +34,7 @@ public class OfToSalExperimenterIdCase extends ConvertorCase actionList = new ArrayList<>(); diff --git a/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java b/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java index 5067023f5d..55d1d0e9b3 100644 --- a/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java +++ b/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java @@ -329,7 +329,7 @@ public class FlowConvertorTest { } @Override - public > E getAugmentation(final Class augmentationType) { + public > E augmentation(final Class augmentationType) { return null; } diff --git a/samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java b/samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java index 82e3077ae1..f770f214ef 100644 --- a/samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java +++ b/samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java @@ -123,7 +123,7 @@ public final class FlowUtils { ActionBuilder ab = new ActionBuilder(); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actionList = new ArrayList<>(); actionList.add(ab.build()); @@ -136,7 +136,7 @@ public final class FlowUtils { InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions InstructionsBuilder isb = new InstructionsBuilder(); @@ -146,7 +146,7 @@ public final class FlowUtils { MatchBuilder matchBuilder = new MatchBuilder(); FlowBuilder allToCtrlFlow = new FlowBuilder().setTableId(tableId).setFlowName("allPacketsToCtrl").setId(flowId) - .setKey(new FlowKey(flowId)); + .withKey(new FlowKey(flowId)); allToCtrlFlow .setMatch(matchBuilder.build()) .setInstructions(isb.build()) diff --git a/samples/sample-bundles/src/main/java/org/opendaylight/openflowplugin/samples/sample/bundles/Activator.java b/samples/sample-bundles/src/main/java/org/opendaylight/openflowplugin/samples/sample/bundles/Activator.java index 57caeb2305..7c3a534fc7 100644 --- a/samples/sample-bundles/src/main/java/org/opendaylight/openflowplugin/samples/sample/bundles/Activator.java +++ b/samples/sample-bundles/src/main/java/org/opendaylight/openflowplugin/samples/sample/bundles/Activator.java @@ -237,7 +237,7 @@ public class Activator extends AbstractBrokerAwareActivator implements BindingAw flowBuilder.setContainerName(null); flowBuilder.setId(new FlowId(flowId)); flowBuilder.setTableId(tableId); - flowBuilder.setKey(key); + flowBuilder.withKey(key); flowBuilder.setFlowName("FlowWithGroupInstruction"); return flowBuilder.build(); @@ -246,7 +246,7 @@ public class Activator extends AbstractBrokerAwareActivator implements BindingAw private static Group createGroup(long groupId) { GroupBuilder groupBuilder = new GroupBuilder(); GroupKey groupKey = new GroupKey(new GroupId(groupId)); - groupBuilder.setKey(groupKey); + groupBuilder.withKey(groupKey); groupBuilder.setGroupId(groupKey.getGroupId()); groupBuilder.setBarrier(false); groupBuilder.setGroupName("Foo"); @@ -318,7 +318,7 @@ public class Activator extends AbstractBrokerAwareActivator implements BindingAw actionBuilder.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionBuilder.build()).build()); actionBuilder.setOrder(1); - actionBuilder.setKey(new ActionKey(0)); + actionBuilder.withKey(new ActionKey(0)); List actionList = new ArrayList<>(); actionList.add(actionBuilder.build()); @@ -329,7 +329,7 @@ public class Activator extends AbstractBrokerAwareActivator implements BindingAw instructionBuilder.setInstruction(new ApplyActionsCaseBuilder() .setApplyActions(applyActionsBuilder.build()).build()); instructionBuilder.setOrder(0); - instructionBuilder.setKey(new InstructionKey(0)); + instructionBuilder.withKey(new InstructionKey(0)); InstructionsBuilder instructionsBuilder = new InstructionsBuilder(); List instructions = new ArrayList<>(); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java index 44fc12dae8..101801a5bb 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java @@ -133,14 +133,14 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid } NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeId)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); return builder; } private void createTestNode() { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(OpenflowpluginTestActivator.NODE_ID)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode12 = builder.build(); } @@ -182,7 +182,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid // Wrap our Apply Action in an Instruction InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instructions @@ -534,7 +534,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid // flow flow.setOutPort(outputPort); - flow.setKey(key); + flow.withKey(key); flow.setPriority(2); flow.setFlowName(originalFlowName + "X" + flowType); return flow; @@ -597,7 +597,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private void createUserNode(String nodeRef) { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeRef)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode12 = builder.build(); } @@ -640,7 +640,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid } private InstanceIdentifier nodeToInstanceId(Node node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } public void _removeGroups(CommandInterpreter ci) { @@ -706,13 +706,13 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class) .child(Group.class, new GroupKey(group.getGroupId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode12), testNode12, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, group, true); InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class) .child(Group.class, new GroupKey(group1.getGroupId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode12), testNode12, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path2, group1, true); @@ -733,12 +733,12 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private void deleteGroup(final CommandInterpreter ci, Group group, Group group1) { ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class) .child(Group.class, new GroupKey(group.getGroupId())); modification.delete(LogicalDatastoreType.OPERATIONAL, path1); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class) .child(Group.class, new GroupKey(group1.getGroupId())); modification.delete(LogicalDatastoreType.OPERATIONAL, path2); modification.delete(LogicalDatastoreType.CONFIGURATION, path2); @@ -762,7 +762,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid GroupBuilder group = new GroupBuilder(); BucketBuilder bucket = new BucketBuilder(); bucket.setBucketId(new BucketId((long) 12)); - bucket.setKey(new BucketKey(new BucketId((long) 12))); + bucket.withKey(new BucketKey(new BucketId((long) 12))); if (groupType == null) { groupType = "g1"; @@ -839,7 +839,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid long id = Long.parseLong(strId); GroupKey key = new GroupKey(new GroupId(id)); - group.setKey(key); + group.withKey(key); // group.setInstall(false); group.setGroupId(new GroupId(id)); group.setGroupName(originalGroupName); @@ -856,7 +856,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid PopVlanActionBuilder vlanAction = new PopVlanActionBuilder(); ActionBuilder action = new ActionBuilder(); action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build()); - action.setKey(new ActionKey(0)); + action.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(action.build()); return actions; @@ -947,7 +947,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid groupActionB.setGroup("0"); ActionBuilder action = new ActionBuilder(); action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build()); - action.setKey(new ActionKey(0)); + action.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(action.build()); return actions; diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java index 7db89be8b0..65d33d106d 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java @@ -141,7 +141,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { } NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeId)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); return builder; } @@ -413,7 +413,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { flow.setOutPort(outputPort); FlowKey key = new FlowKey(new FlowId(Long.toString(id))); - flow.setKey(key); + flow.withKey(key); flow.setPriority(2); flow.setFlowName(originalFlowName + "X" + flowType); return flow; @@ -489,7 +489,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { } private InstanceIdentifier nodeBuilderToInstanceId(NodeBuilder node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } public void _modifyFlows(CommandInterpreter ci) { @@ -625,28 +625,28 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { throw new IllegalArgumentException("Invalid flowtype: " + flowtype); } - InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey()) + InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key()) .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf.getTableId())) - .child(Flow.class, tf.getKey()); + .child(Flow.class, tf.key()); modification.delete(LogicalDatastoreType.OPERATIONAL, path1); modification.delete(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(tn)); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); - InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey()) + InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key()) .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf1.getTableId())) - .child(Flow.class, tf1.getKey()); + .child(Flow.class, tf1.key()); modification.delete(LogicalDatastoreType.OPERATIONAL, path2); modification.delete(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(tn)); modification.delete(LogicalDatastoreType.CONFIGURATION, path2); - InstanceIdentifier path3 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey()) + InstanceIdentifier path3 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key()) .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf2.getTableId())) - .child(Flow.class, tf2.getKey()); + .child(Flow.class, tf2.key()); modification.delete(LogicalDatastoreType.OPERATIONAL, path3); modification.delete(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(tn)); modification.delete(LogicalDatastoreType.CONFIGURATION, path3); - InstanceIdentifier path4 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey()) + InstanceIdentifier path4 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key()) .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf3.getTableId())) - .child(Flow.class, tf3.getKey()); + .child(Flow.class, tf3.key()); modification.delete(LogicalDatastoreType.OPERATIONAL, path4); modification.delete(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(tn)); modification.delete(LogicalDatastoreType.CONFIGURATION, path4); @@ -670,8 +670,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { FlowBuilder flow3, NodeBuilder nodeBuilder) { ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class) - .child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flow.getKey()); + .child(Node.class, nodeBuilder.key()).augmentation(FlowCapableNode.class) + .child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flow.key()); modification.merge(LogicalDatastoreType.OPERATIONAL, nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.OPERATIONAL, path1, flow.build(), true); @@ -679,8 +679,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, flow.build(), true); InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class) - .child(Table.class, new TableKey(flow1.getTableId())).child(Flow.class, flow1.getKey()); + .child(Node.class, nodeBuilder.key()).augmentation(FlowCapableNode.class) + .child(Table.class, new TableKey(flow1.getTableId())).child(Flow.class, flow1.key()); modification.merge(LogicalDatastoreType.OPERATIONAL, nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.OPERATIONAL, path2, flow1.build(), true); @@ -689,8 +689,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { modification.merge(LogicalDatastoreType.CONFIGURATION, path2, flow1.build(), true); InstanceIdentifier path3 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class) - .child(Table.class, new TableKey(flow2.getTableId())).child(Flow.class, flow2.getKey()); + .child(Node.class, nodeBuilder.key()).augmentation(FlowCapableNode.class) + .child(Table.class, new TableKey(flow2.getTableId())).child(Flow.class, flow2.key()); modification.merge(LogicalDatastoreType.OPERATIONAL, nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.OPERATIONAL, path3, flow2.build(), true); @@ -699,8 +699,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { modification.merge(LogicalDatastoreType.CONFIGURATION, path3, flow2.build(), true); InstanceIdentifier path4 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class) - .child(Table.class, new TableKey(flow3.getTableId())).child(Flow.class, flow3.getKey()); + .child(Node.class, nodeBuilder.key()).augmentation(FlowCapableNode.class) + .child(Table.class, new TableKey(flow3.getTableId())).child(Flow.class, flow3.key()); modification.merge(LogicalDatastoreType.OPERATIONAL, nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.OPERATIONAL, path4, flow3.build(), true); @@ -739,7 +739,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { // Wrap our Apply Action in an Instruction InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instructions @@ -841,7 +841,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actionList = new ArrayList<>(); actionList.add(ab.build()); @@ -853,7 +853,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions InstructionsBuilder isb = new InstructionsBuilder(); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java index b4f0c0fe78..7b4ab775d1 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java @@ -97,19 +97,19 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { private void createUserNode(String nodeRef) { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeRef)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private void createTestNode() { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(OpenflowpluginTestActivator.NODE_ID)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private InstanceIdentifier nodeToInstanceId(Node node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } private GroupBuilder createTestGroup(String actionType, String groupType, String groupMod) { @@ -118,7 +118,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { GroupBuilder group = new GroupBuilder(); BucketBuilder bucket = new BucketBuilder(); bucket.setBucketId(new BucketId((long) 12)); - bucket.setKey(new BucketKey(new BucketId((long) 12))); + bucket.withKey(new BucketKey(new BucketId((long) 12))); if (groupType == null) { groupType = "g1"; @@ -243,7 +243,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { long id = 1; GroupKey key = new GroupKey(new GroupId(id)); - group.setKey(key); + group.withKey(key); // group.setInstall(false); group.setGroupId(new GroupId(id)); group.setGroupName(ORIGINAL_GROUP_NAME); @@ -262,7 +262,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { PopVlanActionBuilder vlanAction = new PopVlanActionBuilder(); ActionBuilder action = new ActionBuilder(); action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build()); - action.setKey(new ActionKey(0)); + action.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(action.build()); return actions; @@ -343,7 +343,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { setQueueActionBuilder.setQueueId(1L); ActionBuilder action = new ActionBuilder(); action.setAction(new SetQueueActionCaseBuilder().setSetQueueAction(setQueueActionBuilder.build()).build()); - action.setKey(new ActionKey(0)); + action.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(action.build()); return actions; @@ -388,7 +388,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri("2"); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); ab.setOrder(0); List actions = new ArrayList<>(); @@ -404,7 +404,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.FLOOD.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -418,7 +418,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.ALL.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -432,7 +432,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.ANY.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -446,7 +446,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.NORMAL.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -460,7 +460,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.INPORT.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -474,7 +474,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.TABLE.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -488,7 +488,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.CONTROLLER.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -502,7 +502,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { Uri value = new Uri(OutputPortValues.LOCAL.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(ab.build()); @@ -515,7 +515,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { groupActionB.setGroup("0"); ActionBuilder action = new ActionBuilder(); action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build()); - action.setKey(new ActionKey(0)); + action.withKey(new ActionKey(0)); List actions = new ArrayList<>(); actions.add(action.build()); return actions; @@ -582,7 +582,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { } GroupBuilder gbuilder = createTestGroup(ci.nextArgument(), ci.nextArgument(), "add"); ReadWriteTransaction modification = Preconditions.checkNotNull(dataBroker).newReadWriteTransaction(); - InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey()) + InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key()) .augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(gbuilder.getGroupId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); ListenableFuture commitFuture = modification.submit(); @@ -616,7 +616,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { private void writeGroup(final CommandInterpreter ci, Group group) { ReadWriteTransaction modification = Preconditions.checkNotNull(dataBroker).newReadWriteTransaction(); InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Group.class, new GroupKey(group.getGroupId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode), testNode, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, group, true); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java index 97afbd8600..8218c9d458 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java @@ -83,19 +83,19 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { private void createUserNode(String nodeRef) { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeRef)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private void createTestNode() { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(OpenflowpluginTestActivator.NODE_ID)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private InstanceIdentifier nodeToInstanceId(Node node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } private static final class MeterEventListener implements SalMeterListener { @@ -130,7 +130,7 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { MeterKey key = new MeterKey(new MeterId(id)); MeterBuilder meter = new MeterBuilder(); meter.setContainerName("abcd"); - meter.setKey(key); + meter.withKey(key); meter.setMeterId(new MeterId(9L)); meter.setMeterName(originalMeterName); meter.setFlags(new MeterFlags(true, false, false, false)); @@ -165,7 +165,7 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { MeterKey key = new MeterKey(new MeterId(id)); MeterBuilder meter = new MeterBuilder(); meter.setContainerName("abcd"); - meter.setKey(key); + meter.withKey(key); meter.setMeterId(new MeterId(9L)); MeterBandHeaderBuilder bandHeader = new MeterBandHeaderBuilder(); if (s2.equalsIgnoreCase("modify")) { @@ -229,7 +229,7 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { } createTestMeter(); ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); - InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey()) + InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key()) .augmentation(FlowCapableNode.class).child(Meter.class, new MeterKey(testMeter.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); ListenableFuture commitFuture = modification.submit(); @@ -264,12 +264,12 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { case 1: createTestMeters("1", "remove"); InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter1.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); createTestMeters("2", "remove"); InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter2.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path2); @@ -277,36 +277,36 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { case 2: createTestMeters("3", "remove"); InstanceIdentifier path3 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter1.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path3); createTestMeters("4", "remove"); InstanceIdentifier path4 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter2.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path4); break; case 3: createTestMeters("5", "remove"); InstanceIdentifier path5 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter1.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path5); createTestMeters("6", "remove"); InstanceIdentifier path6 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter2.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path6); break; case 4: createTestMeters("7", "remove"); InstanceIdentifier path7 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter1.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path7); createTestMeters("8", "remove"); InstanceIdentifier path8 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(Meter.class, new MeterKey(testMeter2.getMeterId())); modification.delete(LogicalDatastoreType.CONFIGURATION, path8); break; @@ -383,7 +383,7 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { private void writeMeter(final CommandInterpreter ci, Meter meter) { ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); - InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey()) + InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key()) .augmentation(FlowCapableNode.class).child(Meter.class, new MeterKey(meter.getMeterId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode), testNode, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, meter, true); @@ -403,11 +403,11 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider { private void writeMeter(final CommandInterpreter ci, Meter meter, Meter meter1) { ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); - InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey()) + InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key()) .augmentation(FlowCapableNode.class).child(Meter.class, new MeterKey(meter.getMeterId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode), testNode, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, meter, true); - InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey()) + InstanceIdentifier path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key()) .augmentation(FlowCapableNode.class).child(Meter.class, new MeterKey(meter1.getMeterId())); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode), testNode, true); modification.merge(LogicalDatastoreType.CONFIGURATION, path2, meter1, true); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginStatsTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginStatsTestCommandProvider.java index dd6eb4bc64..264736000b 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginStatsTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginStatsTestCommandProvider.java @@ -64,7 +64,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { int nodeConnectorStatsCount = 0; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); Node node = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, nodeRef); @@ -74,14 +74,14 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { for (NodeConnector nodeConnector2 : ports) { nodeConnectorCount++; - NodeConnectorKey nodeConnectorKey = nodeConnector2.getKey(); + NodeConnectorKey nodeConnectorKey = nodeConnector2.key(); InstanceIdentifier connectorRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).child(NodeConnector.class, nodeConnectorKey); NodeConnector nodeConnector = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, connectorRef); if (nodeConnector != null) { FlowCapableNodeConnectorStatisticsData data = nodeConnector - .getAugmentation(FlowCapableNodeConnectorStatisticsData.class); + .augmentation(FlowCapableNodeConnectorStatisticsData.class); if (null != data) { nodeConnectorStatsCount++; } @@ -105,7 +105,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { int nodeConnectorDescStatsCount = 0; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -115,7 +115,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List ports = node.getNodeConnector(); for (NodeConnector nodeConnector2 : ports) { nodeConnectorCount++; - NodeConnectorKey nodeConnectorKey = nodeConnector2.getKey(); + NodeConnectorKey nodeConnectorKey = nodeConnector2.key(); InstanceIdentifier connectorRef = InstanceIdentifier .create(Nodes.class).child(Node.class, nodeKey) .child(NodeConnector.class, nodeConnectorKey) @@ -149,7 +149,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { int flowStatsCount = 0; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); @@ -159,7 +159,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { if (node != null) { List
tables = node.getTable(); for (Table table2 : tables) { - TableKey tableKey = table2.getKey(); + TableKey tableKey = table2.key(); InstanceIdentifier
tableRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Table.class, tableKey); @@ -169,13 +169,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List flows = table.getFlow(); for (Flow flow2 : flows) { flowCount++; - FlowKey flowKey = flow2.getKey(); + FlowKey flowKey = flow2.key(); InstanceIdentifier flowRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Table.class, tableKey).child(Flow.class, flowKey); Flow flow = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, flowRef); if (flow != null) { - FlowStatisticsData data = flow.getAugmentation(FlowStatisticsData.class); + FlowStatisticsData data = flow.augmentation(FlowStatisticsData.class); if (null != data) { flowStatsCount++; LOG.debug("--------------------------------------------"); @@ -204,7 +204,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { int tableStatsCount = 0; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); @@ -214,13 +214,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List
tables = node.getTable(); for (Table table2 : tables) { tableCount++; - TableKey tableKey = table2.getKey(); + TableKey tableKey = table2.key(); InstanceIdentifier
tableRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Table.class, tableKey); Table table = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, tableRef); if (table != null) { - FlowTableStatisticsData data = table.getAugmentation(FlowTableStatisticsData.class); + FlowTableStatisticsData data = table.augmentation(FlowTableStatisticsData.class); if (null != data) { tableStatsCount++; } @@ -244,7 +244,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { NodeGroupStatistics data = null; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -254,13 +254,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List groups = node.getGroup(); for (Group group2 : groups) { groupCount++; - GroupKey groupKey = group2.getKey(); + GroupKey groupKey = group2.key(); InstanceIdentifier groupRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Group.class, groupKey); Group group = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, groupRef); if (group != null) { - data = group.getAugmentation(NodeGroupStatistics.class); + data = group.augmentation(NodeGroupStatistics.class); if (null != data) { groupStatsCount++; } @@ -285,7 +285,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { NodeGroupDescStats data = null; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -296,13 +296,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List groups = node.getGroup(); for (Group group2 : groups) { groupCount++; - GroupKey groupKey = group2.getKey(); + GroupKey groupKey = group2.key(); InstanceIdentifier groupRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Group.class, groupKey); Group group = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, groupRef); if (group != null) { - data = group.getAugmentation(NodeGroupDescStats.class); + data = group.augmentation(NodeGroupDescStats.class); if (null != data) { groupDescStatsCount++; } @@ -327,7 +327,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { NodeMeterStatistics data = null; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -337,13 +337,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List meters = node.getMeter(); for (Meter meter2 : meters) { meterCount++; - MeterKey meterKey = meter2.getKey(); + MeterKey meterKey = meter2.key(); InstanceIdentifier meterRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Meter.class, meterKey); Meter meter = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, meterRef); if (meter != null) { - data = meter.getAugmentation(NodeMeterStatistics.class); + data = meter.augmentation(NodeMeterStatistics.class); if (null != data) { meterStatsCount++; } @@ -368,7 +368,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { NodeMeterConfigStats data = null; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -378,13 +378,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List meters = node.getMeter(); for (Meter meter2 : meters) { meterCount++; - MeterKey meterKey = meter2.getKey(); + MeterKey meterKey = meter2.key(); InstanceIdentifier meterRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Meter.class, meterKey); Meter meter = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, meterRef); if (meter != null) { - data = meter.getAugmentation(NodeMeterConfigStats.class); + data = meter.augmentation(NodeMeterConfigStats.class); if (null != data) { meterConfigStatsCount++; } @@ -409,7 +409,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { int aggerateFlowStatsCount = 0; List nodes = getNodes(); for (Node node2 : nodes) { - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); @@ -418,13 +418,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List
tables = node.getTable(); for (Table table2 : tables) { aggregateFlowCount++; - TableKey tableKey = table2.getKey(); + TableKey tableKey = table2.key(); InstanceIdentifier
tableRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class) .child(Table.class, tableKey); Table table = TestProviderTransactionUtil.getDataObject(readOnlyTransaction, tableRef); if (table != null) { - AggregateFlowStatisticsData data = table.getAugmentation(AggregateFlowStatisticsData.class); + AggregateFlowStatisticsData data = table.augmentation(AggregateFlowStatisticsData.class); if (null != data) { aggerateFlowStatsCount++; } @@ -448,7 +448,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider { List nodes = getNodes(); for (Node node2 : nodes) { descCount++; - NodeKey nodeKey = node2.getKey(); + NodeKey nodeKey = node2.key(); InstanceIdentifier nodeRef = InstanceIdentifier.create(Nodes.class) .child(Node.class, nodeKey).augmentation(FlowCapableNode.class); ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction(); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java index dbb8d607f8..751eb532d8 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java @@ -95,19 +95,19 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr private void createUserNode(String nodeRef) { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(nodeRef)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private void createTestNode() { NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(OpenflowpluginTestActivator.NODE_ID)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); testNode = builder.build(); } private InstanceIdentifier nodeToInstanceId(Node node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } private TableFeaturesBuilder createTestTableFeatures(String tableFeatureTypeArg) { @@ -220,7 +220,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr .setApplyActionsMiss(new ApplyActionsMissBuilder().setAction(actionList).build()).build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -241,7 +241,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr .setApplyActions(new ApplyActionsBuilder().setAction(actionListt5).build()).build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -256,7 +256,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr tableFeatureProperty.setTableFeaturePropType(nextTblBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -271,7 +271,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr tableFeatureProperty.setTableFeaturePropType(nextTblMissBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -283,7 +283,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr ib.setOrder(1); ib.setInstruction(new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction .instruction.ApplyActionsCaseBuilder().build()); - ib.setKey(new InstructionKey(1)); + ib.withKey(new InstructionKey(1)); List instLst = new ArrayList<>(); TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); @@ -296,7 +296,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -309,13 +309,13 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr ib1.setOrder(1); ib1.setInstruction(new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction .instruction.WriteMetadataCaseBuilder().build()); - ib1.setKey(new InstructionKey(1)); + ib1.withKey(new InstructionKey(1)); InstructionBuilder ib2 = new InstructionBuilder(); ib2.setOrder(2); ib2.setInstruction(new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction .instruction.MeterCaseBuilder().build()); - ib2.setKey(new InstructionKey(2)); + ib2.withKey(new InstructionKey(2)); List instLst = new ArrayList<>(); TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); @@ -328,7 +328,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -355,7 +355,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr .WriteActionsBuilder().setAction(actionList).build()).build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -381,7 +381,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr .miss.WriteActionsMissBuilder().setAction(actionList).build()).build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -405,7 +405,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(matchBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -443,7 +443,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(writeSetfieldBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -480,7 +480,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(writeSetfieldBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -517,7 +517,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(applySetfieldBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -554,7 +554,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(applySetfieldMissBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -584,7 +584,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder(); tableFeatureProperty.setTableFeaturePropType(wildCardsBld.build()); TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0); - tableFeatureProperty.setKey(keyValue); + tableFeatureProperty.withKey(keyValue); tableFeatureProperty.setOrder(1); return tableFeatureProperty; @@ -594,7 +594,7 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr ReadWriteTransaction modification = Preconditions.checkNotNull(dataBroker).newReadWriteTransaction(); KeyedInstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, testNode.getKey()).augmentation(FlowCapableNode.class) + .child(Node.class, testNode.key()).augmentation(FlowCapableNode.class) .child(TableFeatures.class, new TableFeaturesKey(tableFeatures.getTableId())); modification.merge(LogicalDatastoreType.OPERATIONAL, nodeToInstanceId(testNode), testNode, true); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java index 5b4a1695aa..da2077be71 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java @@ -218,12 +218,12 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(localNodeId)); - builder.setKey(new NodeKey(builder.getId())); + builder.withKey(new NodeKey(builder.getId())); return builder; } private InstanceIdentifier nodeBuilderToInstanceId(final NodeBuilder node) { - return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey()); + return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key()); } private FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg, final String tableId) { @@ -700,7 +700,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { flow.setId(new FlowId("12")); flow.setTableId(getTableId(tableId)); - flow.setKey(key); + flow.withKey(key); flow.setFlowName(ORIGINAL_FLOW_NAME + "X" + flowType); return flow; } @@ -743,7 +743,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { flow.setId(new FlowId("12")); flow.setTableId(getTableId(tableId)); - flow.setKey(key); + flow.withKey(key); flow.setFlowName(ORIGINAL_FLOW_NAME + "X" + flowType); return flow; } @@ -757,7 +757,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { flow.setPriority(0); flow.setTableId((short) 0); final FlowKey key = new FlowKey(new FlowId(Long.toString(id))); - flow.setKey(key); + flow.withKey(key); return flow; } @@ -783,7 +783,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final DecNwTtl decNwTtl = ta.build(); final ActionBuilder ab = new ActionBuilder(); ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); // Add our drop action to a list final List actionList = new ArrayList<>(); actionList.add(ab.build()); @@ -795,14 +795,14 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Wrap our Apply Action in an Instruction final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); instructions.add(ib.build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); isb.setInstruction(instructions); return isb; } @@ -818,7 +818,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -836,7 +836,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -853,7 +853,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -864,11 +864,11 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final DropAction dropAction = dab.build(); final ActionBuilder ab = new ActionBuilder(); ab.setAction(new DropActionCaseBuilder().setDropAction(dropAction).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); // Add our drop action to a list final List actionList = new ArrayList<>(); actionList.add(ab.build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); @@ -880,7 +880,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -893,7 +893,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final ControllerActionBuilder controller = new ControllerActionBuilder(); controller.setMaxLength(5); ab.setAction(new ControllerActionCaseBuilder().setControllerAction(controller.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -906,7 +906,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -922,7 +922,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final Uri value = new Uri("PCEP"); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -935,7 +935,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -954,7 +954,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -964,7 +964,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -984,7 +984,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -994,7 +994,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -1014,7 +1014,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1024,7 +1024,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -1042,7 +1042,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final StripVlanActionBuilder stripActionBuilder = new StripVlanActionBuilder(); ab.setAction(new StripVlanActionCaseBuilder().setStripVlanAction(stripActionBuilder.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1052,7 +1052,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -1070,7 +1070,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PushMplsActionBuilder push = new PushMplsActionBuilder(); push.setEthernetType(Integer.valueOf(0x8847)); ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1083,7 +1083,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1097,7 +1097,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PushPbbActionBuilder pbb = new PushPbbActionBuilder(); pbb.setEthernetType(Integer.valueOf(0x88E7)); ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1110,7 +1110,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1124,7 +1124,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PushVlanActionBuilder vlan = new PushVlanActionBuilder(); vlan.setEthernetType(Integer.valueOf(0x8100)); ab.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1138,7 +1138,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1152,7 +1152,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetDlDstActionBuilder setdl = new SetDlDstActionBuilder(); setdl.setAddress(new MacAddress("00:05:b9:7c:81:5f")); ab.setAction(new SetDlDstActionCaseBuilder().setSetDlDstAction(setdl.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1165,7 +1165,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1179,7 +1179,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetDlSrcActionBuilder src = new SetDlSrcActionBuilder(); src.setAddress(new MacAddress("00:05:b9:7c:81:5f")); ab.setAction(new SetDlSrcActionCaseBuilder().setSetDlSrcAction(src.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1193,7 +1193,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1208,7 +1208,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final VlanId a = new VlanId(4000); vl.setVlanId(a); ab.setAction(new SetVlanIdActionCaseBuilder().setSetVlanIdAction(vl.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1221,7 +1221,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1236,7 +1236,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final VlanPcp pcp1 = new VlanPcp((short) 2); pcp.setVlanPcp(pcp1); ab.setAction(new SetVlanPcpActionCaseBuilder().setSetVlanPcpAction(pcp.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1249,7 +1249,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1265,7 +1265,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final VlanPcp pcp1 = new VlanPcp((short) 4); pcp.setVlanPcp(pcp1); ab.setAction(new SetVlanPcpActionCaseBuilder().setSetVlanPcpAction(pcp.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1278,7 +1278,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1291,7 +1291,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final CopyTtlInBuilder ttlin = new CopyTtlInBuilder(); ab.setAction(new CopyTtlInCaseBuilder().setCopyTtlIn(ttlin.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1304,7 +1304,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1317,7 +1317,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final CopyTtlOutBuilder ttlout = new CopyTtlOutBuilder(); ab.setAction(new CopyTtlOutCaseBuilder().setCopyTtlOut(ttlout.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1330,7 +1330,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1343,7 +1343,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final DecMplsTtlBuilder mpls = new DecMplsTtlBuilder(); ab.setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(mpls.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1352,7 +1352,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Wrap our Apply Action in an Instruction final InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setOrder(0); // Put our Instruction in a list of Instruction @@ -1370,7 +1370,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final DecNwTtlBuilder nwttl = new DecNwTtlBuilder(); ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(nwttl.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1384,7 +1384,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1397,7 +1397,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final DropActionBuilder drop = new DropActionBuilder(); ab.setAction(new DropActionCaseBuilder().setDropAction(drop.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1411,7 +1411,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1424,7 +1424,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final FloodActionBuilder fld = new FloodActionBuilder(); ab.setAction(new FloodActionCaseBuilder().setFloodAction(fld.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1437,7 +1437,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1450,7 +1450,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final FloodAllActionBuilder fldall = new FloodAllActionBuilder(); ab.setAction(new FloodAllActionCaseBuilder().setFloodAllAction(fldall.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1463,7 +1463,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1478,7 +1478,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { groupActionB.setGroupId(1L); groupActionB.setGroup("0"); ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1492,7 +1492,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1505,7 +1505,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final HwPathActionBuilder hwPathB = new HwPathActionBuilder(); ab.setAction(new HwPathActionCaseBuilder().setHwPathAction(hwPathB.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1518,7 +1518,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1531,7 +1531,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final LoopbackActionBuilder loopbackActionBuilder = new LoopbackActionBuilder(); ab.setAction(new LoopbackActionCaseBuilder().setLoopbackAction(loopbackActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1545,7 +1545,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1559,7 +1559,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PopMplsActionBuilder popMplsActionBuilder = new PopMplsActionBuilder(); popMplsActionBuilder.setEthernetType(0XB); ab.setAction(new PopMplsActionCaseBuilder().setPopMplsAction(popMplsActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1572,7 +1572,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1585,7 +1585,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PopPbbActionBuilder popPbbActionBuilder = new PopPbbActionBuilder(); ab.setAction(new PopPbbActionCaseBuilder().setPopPbbAction(popPbbActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1598,7 +1598,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1611,7 +1611,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final PopVlanActionBuilder popVlanActionBuilder = new PopVlanActionBuilder(); ab.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(popVlanActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1625,7 +1625,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1639,7 +1639,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetDlTypeActionBuilder setDlTypeActionBuilder = new SetDlTypeActionBuilder(); setDlTypeActionBuilder.setDlType(new EtherType(8L)); ab.setAction(new SetDlTypeActionCaseBuilder().setSetDlTypeAction(setDlTypeActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1653,7 +1653,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1666,7 +1666,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetFieldBuilder setFieldBuilder = new SetFieldBuilder(); setFieldBuilder.setInPort(new NodeConnectorId(nodeId + ":2")); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1680,7 +1680,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1694,7 +1694,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetMplsTtlActionBuilder setMplsTtlActionBuilder = new SetMplsTtlActionBuilder(); setMplsTtlActionBuilder.setMplsTtl((short) 0X1); ab.setAction(new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(setMplsTtlActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1708,7 +1708,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1725,7 +1725,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ipnext.setIpv4Address(prefix); setNextHopActionBuilder.setAddress(ipnext.build()); ab.setAction(new SetNextHopActionCaseBuilder().setSetNextHopAction(setNextHopActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1739,7 +1739,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1756,7 +1756,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ipdst.setIpv4Address(prefixdst); setNwDstActionBuilder.setAddress(ipdst.build()); ab.setAction(new SetNwDstActionCaseBuilder().setSetNwDstAction(setNwDstActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1770,7 +1770,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1787,7 +1787,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ipsrc.setIpv4Address(prefixsrc); setNwsrcActionBuilder.setAddress(ipsrc.build()); ab.setAction(new SetNwSrcActionCaseBuilder().setSetNwSrcAction(setNwsrcActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1801,7 +1801,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1815,7 +1815,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetNwTosActionBuilder setNwTosActionBuilder = new SetNwTosActionBuilder(); setNwTosActionBuilder.setTos(8); ab.setAction(new SetNwTosActionCaseBuilder().setSetNwTosAction(setNwTosActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1828,7 +1828,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1842,7 +1842,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetNwTtlActionBuilder setNwTtlActionBuilder = new SetNwTtlActionBuilder(); setNwTtlActionBuilder.setNwTtl((short) 1); ab.setAction(new SetNwTtlActionCaseBuilder().setSetNwTtlAction(setNwTtlActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1856,7 +1856,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1870,7 +1870,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetQueueActionBuilder setQueueActionBuilder = new SetQueueActionBuilder(); setQueueActionBuilder.setQueueId(1L); ab.setAction(new SetQueueActionCaseBuilder().setSetQueueAction(setQueueActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1883,7 +1883,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1898,7 +1898,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { setTpDstActionBuilder.setPort(new PortNumber(109)); ab.setAction(new SetTpDstActionCaseBuilder().setSetTpDstAction(setTpDstActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -1911,7 +1911,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1925,7 +1925,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetTpSrcActionBuilder setTpSrcActionBuilder = new SetTpSrcActionBuilder(); setTpSrcActionBuilder.setPort(new PortNumber(109)); ab.setAction(new SetTpSrcActionCaseBuilder().setSetTpSrcAction(setTpSrcActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1939,7 +1939,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1953,7 +1953,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SetVlanCfiActionBuilder setVlanCfiActionBuilder = new SetVlanCfiActionBuilder(); setVlanCfiActionBuilder.setVlanCfi(new VlanCfi(2)); ab.setAction(new SetVlanCfiActionCaseBuilder().setSetVlanCfiAction(setVlanCfiActionBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1967,7 +1967,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -1980,7 +1980,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { final SwPathActionBuilder swPathAction = new SwPathActionBuilder(); ab.setAction(new SwPathActionCaseBuilder().setSwPathAction(swPathAction.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Create an Apply Action @@ -1994,7 +1994,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -2029,28 +2029,28 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { setFieldBuilder1.setEthernetMatch(ethernetMatch1.build()); setFieldBuilder2.setEthernetMatch(ethernetMatch2.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); ab2.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder2.build()).build()); - ab2.setKey(new ActionKey(2)); + ab2.withKey(new ActionKey(2)); actionList.add(ab2.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); final List instructions = new ArrayList<>(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); instructions.add(ib.build()); isb.setInstruction(instructions); return isb; @@ -2076,17 +2076,17 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { setFieldBuilder.setVlanMatch(vlanBuilder.build()); setFieldBuilder1.setVlanMatch(vlanBuilder1.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2117,24 +2117,24 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ipmatch2.setIpProtocol((short) 120); setFieldBuilder.setIpMatch(ipmatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setIpMatch(ipmatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); setFieldBuilder2.setIpMatch(ipmatch2.build()); ab2.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder2.build()).build()); - ab2.setKey(new ActionKey(2)); + ab2.withKey(new ActionKey(2)); actionList.add(ab2.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2162,19 +2162,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ipv4Match.setIpv4Source(srcip); setFieldBuilder.setLayer3Match(ipv4Match.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setLayer3Match(ipv4Match1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2203,19 +2203,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { tcpmatch1.setTcpDestinationPort(tcpdstport); setFieldBuilder.setLayer4Match(tcpmatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setLayer4Match(tcpmatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2244,19 +2244,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { udpmatch1.setUdpSourcePort(udpsrcport); setFieldBuilder.setLayer4Match(udpmatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setLayer4Match(udpmatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2285,19 +2285,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { sctpmatch1.setSctpDestinationPort(dstport); setFieldBuilder.setLayer4Match(sctpmatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setLayer4Match(sctpmatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2323,19 +2323,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { icmpv4match1.setIcmpv4Code((short) 0); setFieldBuilder.setIcmpv4Match(icmpv4match.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setIcmpv4Match(icmpv4match1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2383,34 +2383,34 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { arpmatch4.setArpTargetTransportAddress(dstiparp); setFieldBuilder.setLayer3Match(arpmatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setLayer3Match(arpmatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); setFieldBuilder2.setLayer3Match(arpmatch2.build()); ab2.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder2.build()).build()); - ab2.setKey(new ActionKey(2)); + ab2.withKey(new ActionKey(2)); actionList.add(ab2.build()); setFieldBuilder3.setLayer3Match(arpmatch3.build()); ab3.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder3.build()).build()); - ab3.setKey(new ActionKey(3)); + ab3.withKey(new ActionKey(3)); actionList.add(ab3.build()); setFieldBuilder4.setLayer3Match(arpmatch4.build()); ab4.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder4.build()).build()); - ab4.setKey(new ActionKey(4)); + ab4.withKey(new ActionKey(4)); actionList.add(ab4.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2454,29 +2454,29 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { setFieldBuilder.setLayer3Match(ipv6Builder.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionLists.add(ab.build()); setFieldBuilder1.setLayer3Match(ipv6Builder1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionLists.add(ab1.build()); setFieldBuilder5.setLayer3Match(ipv6Builder5.build()); ab5.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder5.build()).build()); - ab5.setKey(new ActionKey(5)); + ab5.withKey(new ActionKey(5)); actionLists.add(ab5.build()); setFieldBuilder6.setLayer3Match(ipv6Builder6.build()); ab6.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder6.build()).build()); - ab6.setKey(new ActionKey(6)); + ab6.withKey(new ActionKey(6)); actionLists.add(ab6.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionLists); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2502,19 +2502,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { icmpv6match1.setIcmpv6Code((short) 0); setFieldBuilder.setIcmpv6Match(icmpv6match.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setIcmpv6Match(icmpv6match1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2544,24 +2544,24 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { protomatch2.setMplsBos((short) 1); setFieldBuilder.setProtocolMatchFields(protomatch.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); setFieldBuilder1.setProtocolMatchFields(protomatch1.build()); ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build()); - ab1.setKey(new ActionKey(1)); + ab1.withKey(new ActionKey(1)); actionList.add(ab1.build()); setFieldBuilder2.setProtocolMatchFields(protomatch2.build()); ab2.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder2.build()).build()); - ab2.setKey(new ActionKey(2)); + ab2.withKey(new ActionKey(2)); actionList.add(ab2.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2589,7 +2589,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2610,14 +2610,14 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { tunnel.setTunnelId(BigInteger.valueOf(10668)); setFieldBuilder.setTunnel(tunnel.build()); ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); final ApplyActionsBuilder aab = new ApplyActionsBuilder(); aab.setAction(actionList); final InstructionBuilder ib = new InstructionBuilder(); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions @@ -2642,7 +2642,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Add the IPv4 tunnel dst to the set_field value ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Resulting action is a per/flow src TEP (set_field:172.16.100.100->tun_dst) final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -2650,7 +2650,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Add the action to the ordered list of Instructions final InstructionBuilder ib = new InstructionBuilder(); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Add the Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -2674,7 +2674,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Add the IPv4 tunnel src to the set_field value ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build()); ab.setOrder(0); - ab.setKey(new ActionKey(0)); + ab.withKey(new ActionKey(0)); actionList.add(ab.build()); // Resulting action is a per/flow src TEP (set_field:172.16.100.100->tun_src) final ApplyActionsBuilder aab = new ApplyActionsBuilder(); @@ -2682,7 +2682,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { // Add the action to the ordered list of Instructions final InstructionBuilder ib = new InstructionBuilder(); ib.setOrder(0); - ib.setKey(new InstructionKey(0)); + ib.withKey(new InstructionKey(0)); ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build()); // Put our Instruction in a list of Instructions final InstructionsBuilder isb = new InstructionsBuilder(); @@ -3147,9 +3147,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { } else { tf = createTestFlow(tn, flowtype, ci.nextArgument()); } - final InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey()) + final InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key()) .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf.getTableId())) - .child(Flow.class, tf.getKey()); + .child(Flow.class, tf.key()); modification.delete(LogicalDatastoreType.CONFIGURATION, path1); final ListenableFuture commitFuture = modification.submit(); Futures.addCallback(commitFuture, new FutureCallback() { @@ -3186,8 +3186,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { private void writeFlow(final CommandInterpreter ci, final FlowBuilder flow, final NodeBuilder nodeBuilder) { final ReadWriteTransaction modification = dataBroker.newReadWriteTransaction(); final InstanceIdentifier path1 = InstanceIdentifier.create(Nodes.class) - .child(Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class) - .child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flow.getKey()); + .child(Node.class, nodeBuilder.key()).augmentation(FlowCapableNode.class) + .child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flow.key()); modification.merge(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build(), true); modification.merge(LogicalDatastoreType.CONFIGURATION, path1, flow.build(), true);