Fixup Augmentable and Identifiable methods changing 24/72524/3
authorStephen Kitt <skitt@redhat.com>
Thu, 31 May 2018 13:23:17 +0000 (15:23 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 4 Jun 2018 12:10:40 +0000 (14:10 +0200)
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 <skitt@redhat.com>
125 files changed:
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/BulkOMaticUtils.java
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriter.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ReconciliationServiceImpl.java
applications/forwardingrules-manager/src/test/java/test/mock/FlowListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/GroupListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/MeterListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/TableFeaturesListenerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListener.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/AdminReconciliationServiceImpl.java
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java
applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java
applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java
applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/TopologyManagerUtil.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java
extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingLooseResolver.java
extension/openflowplugin-extension-api/src/main/java/org/opendaylight/openflowplugin/extension/api/GroupingResolver.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java
extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/OnfExperimenterErrorFactoryTest.java
extension/test-extension/src/main/java/org/opendaylight/openflowplugin/extension/test/Test.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/ext/OnfOxmTcpFlagsSerializer.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/multipart/MultipartReplyTableFeaturesTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactoryTest.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/GroupDescMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/MeterConfigMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/QueueStatsMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/instruction/AbstractActionInstructionDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/FlowMessageDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/GroupMessageDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowTableStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyGroupDescDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyGroupStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMeterConfigDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMeterStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyPortStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyQueueStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyTableFeaturesDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactory.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/NodeConnectorStatisticsToNotificationTransformer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/PortDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/ApplyActionsInstructionSerializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/instructions/WriteActionsInstructionSerializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializerTest.java
openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowInstructionResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalExperimenterIdCase.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterStatsResponseConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/PacketOutConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java
samples/sample-bundles/src/main/java/org/opendaylight/openflowplugin/samples/sample/bundles/Activator.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginStatsTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index 9d095c2644788284a3bee057b2c013ca15bee2a1..60114cf99e6a74fd068a69d12dd9690f192cf6bd 100644 (file)
@@ -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();
index ae354e8f01305aacfd9dd01d9a2fd1f840cea1eb..65986cd1db8f18a627d51014daab92ca87036e84 100644 (file)
@@ -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<Table> tableIId = BulkOMaticUtils.getTableId(tableId, dpId);
 
                     if (isAdd) {
index 417e56e18487bd4cf72b437c4ff3d4f6519a7e4d..7f62bdd138ee203916133c117257905fb371326c 100644 (file)
@@ -243,7 +243,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
                         if (rpcResult.isSuccessful()) {
                             for (Meter meter : meters) {
                                 final KeyedInstanceIdentifier<Meter, MeterKey> 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.<TableFeatures>emptyList();
                 for (TableFeatures tableFeaturesItem : tableList) {
-                    TableFeaturesKey tableKey = tableFeaturesItem.getKey();
+                    TableFeaturesKey tableKey = tableFeaturesItem.key();
                     KeyedInstanceIdentifier<TableFeatures, TableFeaturesKey> 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.<Meter>emptyList();
                 for (Meter meter : meters) {
                     final KeyedInstanceIdentifier<Meter, MeterKey> 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.<Table>emptyList();
                 for (Table table : tables) {
                     final KeyedInstanceIdentifier<Table, TableKey> tableIdent = nodeIdentity.child(Table.class,
-                            table.getKey());
+                            table.key());
                     List<Flow> flows = table.getFlow() != null ? table.getFlow() : Collections.<Flow>emptyList();
                     for (Flow flow : flows) {
                         final KeyedInstanceIdentifier<Flow, FlowKey> 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<Long, ListenableFuture<?>> map, Group group) {
-            KeyedInstanceIdentifier<Group, GroupKey> groupIdent = nodeIdentity.child(Group.class, group.getKey());
+            KeyedInstanceIdentifier<Group, GroupKey> 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.<Table>emptyList();
             for (Table table : tables) {
                 final KeyedInstanceIdentifier<Table, TableKey> tableIdent = nodeIdent.child(Table.class,
-                        table.getKey());
+                        table.key());
                 List<StaleFlow> staleFlows = table.getStaleFlow() != null ? table.getStaleFlow()
                         : Collections.<StaleFlow>emptyList();
                 for (StaleFlow staleFlow : staleFlows) {
@@ -575,7 +575,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
                     Flow toBeDeletedFlow = flowBuilder.setId(staleFlow.getId()).build();
 
                     final KeyedInstanceIdentifier<Flow, FlowKey> 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<Group, GroupKey> 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<Meter, MeterKey> meterIdent = nodeIdent.child(Meter.class,
-                        toBeDeletedMeter.getKey());
+                        toBeDeletedMeter.key());
 
                 this.provider.getMeterCommiter().remove(meterIdent, toBeDeletedMeter, nodeIdent);
 
index e7f1dd2507de3d928003dbe4ad78b2302a009f6f..bd4477dbb4c3a3c9b91822e2ca64c6ffdcef523f 100644 (file)
@@ -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<FlowCapableNode> 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<ReconcileNodeOutput>> rpcResult = SettableFuture.create();
         ListenableFuture<Boolean> futureResult = forwardingRulesManagerImpl
                 .getNodeListener().reconcileConfiguration(connectedNode);
index 78b26ec8e91f70ed97e710f922b73e0562e9ab89..d4faccda1de5c3c6dbec23b91163ccb8be6fbe57 100644 (file)
@@ -90,8 +90,8 @@ public class FlowListenerTest extends FRMTest {
                 .augmentation(FlowCapableNode.class).child(Table.class, tableKey);
         InstanceIdentifier<Flow> 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.<Flow>emptyList()).build();
-        Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build();
+        Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.<Flow>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<Flow> 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.<Flow>emptyList()).build();
-        Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build();
+        Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.<Flow>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<Flow> 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.<Flow>emptyList()).build();
+        Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.<Flow>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<Flow> 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.<Flow>emptyList()).build();
-        Flow flow = new FlowBuilder().setKey(flowKey).setTableId((short) 2).build();
+        Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.<Flow>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<StaleFlow> 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.<StaleFlow>emptyList()).build();
-        StaleFlow flow = new StaleFlowBuilder().setKey(flowKey).setTableId((short) 2).build();
+        Table table = new TableBuilder().withKey(tableKey).setStaleFlow(Collections.<StaleFlow>emptyList()).build();
+        StaleFlow flow = new StaleFlowBuilder().withKey(flowKey).setTableId((short) 2).build();
 
         WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
         writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table);
index 4a6bc51e6a0335283b1e69f1cb768319bb2f406e..d4cc4556baa9baee7311c11e2e7ffdeb00bfc015 100644 (file)
@@ -85,7 +85,7 @@ public class GroupListenerTest extends FRMTest {
         GroupKey groupKey = new GroupKey(new GroupId((long) 255));
         InstanceIdentifier<Group> 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<Group> 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<Group> 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<StaleGroup> 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);
index 12a88c41043454b3a806b29d1392a582fb2f0b2c..7f6e40866f297a5b436b3c83bf5d843677a05a78 100644 (file)
@@ -84,7 +84,7 @@ public class MeterListenerTest extends FRMTest {
         MeterKey meterKey = new MeterKey(new MeterId((long) 2000));
         InstanceIdentifier<Meter> 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<Meter> 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<Meter> 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<StaleMeter> 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);
index ddaa0e68a81da51b34db5d683f889d68ce38a27e..b68359964ee47da068723d49c2bc695f1c354249 100644 (file)
@@ -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<TableFeatures> 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());
index 8156b1a67cdf73606b62a3dd60b2b44e0b8a8165..642a247153d696983f64e2f909554e12249cb89a 100644 (file)
@@ -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.<Flow>emptyList()).build();
+        final Table table = new TableBuilder().withKey(tableKey).setFlow(Collections.<Flow>emptyList()).build();
         WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
         InstanceIdentifier<Table> tableII = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey)
                 .augmentation(FlowCapableNode.class).child(Table.class, tableKey);
index 9e805e2d18b79b645f936b6966cdb88c349a4f58..f7f51b4753f41a1bf76af834a868543fa3706938 100644 (file)
@@ -177,7 +177,7 @@ public class SimplifiedOperationalListener extends AbstractFrmSyncListener<Node>
     private boolean isConsistentForReconcile(final DataTreeModification<Node> 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());
index 40265410b004559fe6cebef535e39ca3f8552b06..2e69f01900abe50ac0d72985f8e1f6e55d934956 100644 (file)
@@ -154,7 +154,7 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy
             final KeyedInstanceIdentifier<Table, TableKey> tableIdent = nodeIdent.child(Table.class, tableKey);
 
             for (final Flow flow : flowSyncBox.getItemsToPush()) {
-                final KeyedInstanceIdentifier<Flow, FlowKey> flowIdent = tableIdent.child(Flow.class, flow.getKey());
+                final KeyedInstanceIdentifier<Flow, FlowKey> 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<Flow, FlowKey> 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<Flow, FlowKey> 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<Meter, MeterKey> 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<Group> groupsPortion) {
         List<ListenableFuture<RpcResult<RemoveGroupOutput>>> allResults = new ArrayList<>();
         for (Group group : groupsPortion.getItemsToPush()) {
-            final KeyedInstanceIdentifier<Group, GroupKey> groupIdent = nodeIdent.child(Group.class, group.getKey());
+            final KeyedInstanceIdentifier<Group, GroupKey> 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<ListenableFuture<RpcResult<UpdateGroupOutput>>> allUpdateResults = new ArrayList<>();
 
         for (Group group : groupsPortion.getItemsToPush()) {
-            final KeyedInstanceIdentifier<Group, GroupKey> groupIdent = nodeIdent.child(Group.class, group.getKey());
+            final KeyedInstanceIdentifier<Group, GroupKey> 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<Group, GroupKey> groupIdent = nodeIdent.child(Group.class, group.getKey());
+            final KeyedInstanceIdentifier<Group, GroupKey> 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<ListenableFuture<RpcResult<AddMeterOutput>>> allResults = new ArrayList<>();
         final List<ListenableFuture<RpcResult<UpdateMeterOutput>>> allUpdateResults = new ArrayList<>();
         for (Meter meter : syncBox.getItemsToPush()) {
-            final KeyedInstanceIdentifier<Meter, MeterKey> meterIdent = nodeIdent.child(Meter.class, meter.getKey());
+            final KeyedInstanceIdentifier<Meter, MeterKey> 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<Meter> meterTuple : syncBox.getItemsToUpdate()) {
             final Meter existingMeter = meterTuple.getOriginal();
             final Meter updated = meterTuple.getUpdated();
-            final KeyedInstanceIdentifier<Meter, MeterKey> meterIdent = nodeIdent.child(Meter.class, updated.getKey());
+            final KeyedInstanceIdentifier<Meter, MeterKey> 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)));
index 3c96f8b1b36524878599922a5c32eb87ef7a943b..2c87661f5eaf149cf5c24517aafc77725c055d6f 100644 (file)
@@ -54,6 +54,6 @@ public final class ModificationUtil {
         if (dataAfter == null) {
             return null;
         }
-        return dataAfter.getAugmentation(FlowCapableNode.class);
+        return dataAfter.augmentation(FlowCapableNode.class);
     }
 }
index cb695b691a2aa1d5a9dc6408d3bcd5fe20742ac5..685c2762be3026c015a2b0d03ab585211490f738 100644 (file)
@@ -349,7 +349,7 @@ public final class ReconcileUtil {
             final ItemSyncBox<Flow> flowsSyncBox = resolveFlowDiffsInTable(
                     flowsConfigured, flowOperationalMap, gatherUpdates);
             if (!flowsSyncBox.isEmpty()) {
-                tableFlowSyncBoxes.put(tableConfigured.getKey(), flowsSyncBox);
+                tableFlowSyncBoxes.put(tableConfigured.key(), flowsSyncBox);
             }
         }
         return tableFlowSyncBoxes;
index 15b920d2b8ad56a3802be37233944a8ab96a3409..9ba97bfa13b212f5f01b37ff19fa31fd991c3a1f 100644 (file)
@@ -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);
index fa0fcbf38da13736ed7d5f421156358072cdf6ba..54609323e485a07962c7b7c4a6307136cb564ec8 100644 (file)
@@ -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
index dae539f259b534bf67a2269708985e6ac77abe2c..379eb257b88379f24631f93fe79f3dab2ff06cb7 100644 (file)
@@ -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());
     }
index f854f0540868e10b55dd4533d7b696bc0130540e..755fb29ceb3c4a9e753fa32892028a031ed2f3b2 100644 (file)
@@ -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();
index c2f7fd01cf98561c0fe17fd953e62b6f5785b9a1..c12b9b9833287333a6cdd249b055aa0728996f62 100644 (file)
@@ -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));
index b5295298a6814f2f364bf1f16c85251f3bbea93f..67c27cd73201034f12a1f461b476c142204857cc 100644 (file)
@@ -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());
index 7d721a54dac397b7b74a6d03021e628af0ed2eb3..d381c396084280fb0a38dd4597fc74eb7e9dddfa 100644 (file)
@@ -141,7 +141,7 @@ public class AdminReconciliationServiceImpl implements AdminReconciliationServic
         ReadWriteTransaction tx = broker.newReadWriteTransaction();
         Optional<ReconcileCounter> 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);
index 31810a95f02876e68a6ed7b51512eee8cac859d2..69f46ed7b71a07ce70a3f13f0ff4601407094f95 100644 (file)
@@ -56,9 +56,9 @@ public final class ShellUtil {
             for (Node node : nodes) {
                 String[] nodeId = node.getId().getValue().split(":");
                 String name = null;
-                FlowCapableNode flowCapableNode = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class);
+                FlowCapableNode flowCapableNode = node.<FlowCapableNode>augmentation(FlowCapableNode.class);
                 if (flowCapableNode != null) {
-                    name = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class).getDescription();
+                    name = node.<FlowCapableNode>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<NodeConnector> nodeConnectors = null;
                 List<String> portList = new ArrayList<>();
-                FlowCapableNode flowCapableNode = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class);
+                FlowCapableNode flowCapableNode = node.<FlowCapableNode>augmentation(FlowCapableNode.class);
                 if (flowCapableNode != null) {
-                    name = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class).getDescription();
+                    name = node.<FlowCapableNode>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;
index 356822c55cc81a50c904339a66430974df6d0d61..ffa6baf02a8b1a411a3d8b1468ca7b74105ee3e6 100644 (file)
@@ -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();
index 8f07c1b06a7f8f6d678981fb8ccba1b638cfe3c4..fd0b1bc42e625f6330eb2b4a478ee1aa8e2dc72c 100644 (file)
@@ -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();
         }
 
index 3a37d3e18e0f033351dca8243fa67cd8d1eba115..d2577e25df781d8c3698e2f5d958c6c50e02e732 100644 (file)
@@ -89,7 +89,7 @@ final class TopologyManagerUtil {
     }
 
     static InstanceIdentifier<Link> linkPath(final Link link, final InstanceIdentifier<Topology> topology) {
-        return topology.child(Link.class, link.getKey());
+        return topology.child(Link.class, link.key());
     }
 
 
index c2ef7a754a8ef8141eea57cc9225879caa36f7dd..fa6a2b284e6d363412819621fcfe9ea3be6213f3 100644 (file)
@@ -58,7 +58,7 @@ public class NodeChangeListenerImplTest extends DataTreeChangeListenerBase {
     public void testOnNodeRemoved() {
         NodeKey topoNodeKey = new NodeKey(new NodeId("node1"));
         final InstanceIdentifier<Node> 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<Node> 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());
     }
index 72979c9161ff1ea43db7672545c4cde92929efe8..c13514fe21ca438c38bc98136973f31aed852f92 100644 (file)
@@ -67,7 +67,7 @@ public class TerminationPointChangeListenerImplTest extends DataTreeChangeListen
         TerminationPointKey terminationPointKey = new TerminationPointKey(new TpId("tp1"));
 
         final InstanceIdentifier<Node> 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<Node> 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);
     }
 }
index 627fd5f613143461782cdc9625bb43ee72ac6e54..bb1fc0da6cde5fe3cef1a6e7086ab4cf25a183c6 100644 (file)
@@ -87,7 +87,7 @@ public class GroupingLooseResolver<G> {
 
         for (Class<? extends Augmentation<?>> cls : classes) {
             Augmentation<T> potential = guessData
-                    .getAugmentation((Class<Augmentation<T>>) cls);
+                    .augmentation((Class<Augmentation<T>>) cls);
             if (potential != null) {
                 return Optional.of((G) potential);
             }
index f4d379d437f71909d1ddcf3b63681320d2441472..a8191947bec43e3675ef4e2c11bfc4d2bfb1a860 100644 (file)
@@ -68,7 +68,7 @@ public class GroupingResolver<G, T extends Augmentable<T>> {
     @SuppressWarnings("unchecked")
     public Optional<G> getExtension(T data) {
         for (Class<? extends Augmentation<T>> cls : classes) {
-            Augmentation<T> potential = data.getAugmentation(cls);
+            Augmentation<T> potential = data.augmentation(cls);
             if (potential != null) {
                 return Optional.of((G) potential);
             }
index 8f9c4cd1823cbc7c814866d7b18ed29b6bab73d6..16b5ad4902b18cdb03d16b28feea224066718a84 100644 (file)
@@ -64,7 +64,7 @@ public class ArpOpConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpOp(nxmOfArpOpBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(extensionAugmentation);
 
         final MatchEntry converted = arpOpConvertor.convert(extension);
index 5f70f50f7245e7fb227823f3b4cc4ad891dcadef..572af6193753d6bee6913578eb35239c322184e4 100644 (file)
@@ -61,7 +61,7 @@ public class ArpShaConvertorTest {
                 .setNxmNxArpSha(nxmNxArpShaBuilder.build());
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
 
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpShaConvertor = new ArpShaConvertor();
index c4d3033223bec21684d69a872e656b6bf1c52f77..d862b0b2ade2b8dae3fee835b0c15b4bc3152da0 100644 (file)
@@ -63,7 +63,7 @@ public class ArpSpaConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpSpa(nxmOfArpSpaBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(extensionAugmentation);
 
         final MatchEntry converted = arpSpaConvertor.convert(extension);
index 13520a1923cc0da66f63cae22c7b8599af826b29..7e13f66cbc11b97813cc86646fe88f53b43be007 100644 (file)
@@ -58,7 +58,7 @@ public class ArpThaConvertorTest {
                 .setNxmNxArpTha(nxArpThaBuilder.build());
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
 
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpThaConvertor = new ArpThaConvertor();
index add196126cbb62d6fd9dffb025c18254226d0965..2627186e27720e2631cc7021e31ccf927161c281 100644 (file)
@@ -59,7 +59,7 @@ public class ArpTpaConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpTpa(nxmOfArpTpaBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpTpaConvertor = new ArpTpaConvertor();
index a4b3a3fd208bf099520d7bedb909f903c61406c6..5e6f651aa408ed8faca4441624615bee2e4333a2 100644 (file)
@@ -57,7 +57,7 @@ public class CtStateConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtState(nxmNxCtStateBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ctStateConvertor = new CtStateConvertor();
index fbf720f7b0dd9ee36055029c2e42021d428ce23b..91a5c39186cdc0345fbbc00633faa7899c57a4f4 100644 (file)
@@ -56,7 +56,7 @@ public class CtZoneConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtZone(nxmNxCtZoneBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ctZoneConvertor = new CtZoneConvertor();
index fbc693beae1e1e8b894d06bc9504a62f2cda48d4..f9c1a8c9853c15b7fda52c8c7b6519fba77137a5 100644 (file)
@@ -59,7 +59,7 @@ public class EthDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthDst(nxmOfEthDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethDstConvertor = new EthDstConvertor();
index 23bb8c9127f709a9e002ad936aa4bb461815369d..7c1461a380d3b2ca5d5210a941cba5321d443d4c 100644 (file)
@@ -58,7 +58,7 @@ public class EthSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthSrc(nxmOfEthSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethSrcConvertor = new EthSrcConvertor();
index 6a4e7556d557eca86c5dab4be4df0efd68cc6db7..6e4e3a37f28ef70a87b46fe1e78b0c18d981c461 100644 (file)
@@ -56,7 +56,7 @@ public class EthTypeConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthType(nxmOfEthTypeBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethTypeConvertor = new EthTypeConvertor();
index 111d205a75e2113c9698596be821fea07c909120..9ad530879d8e6ff53ca3b787fe75d305d6b93c56 100644 (file)
@@ -55,7 +55,7 @@ public class Nshc1ConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc1(nxmNxNshc1Builder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nshc1Convertor = new Nshc1Convertor();
index 26fcc44113859c282da1ac0a4bc1960167293e0f..f6ecfac893c9ad9fd6e89ebb2b35fae56742c43a 100644 (file)
@@ -54,7 +54,7 @@ public class Nshc2ConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc2(nxmNxNshc2Builder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nshc2Convertor = new Nshc2Convertor();
index ecf8c2f852d4f08c6caf3d91efee8ccf68354854..1a42de53b7bfcd124b01de41835fb8eaf11dceb7 100644 (file)
@@ -55,7 +55,7 @@ public class Nshc3ConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc3(nxmNxNshc3Builder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nshc3Convertor = new Nshc3Convertor();
index 4a6de9e4579d4d0bc96311880007318c575dc5e9..e0a7c4c918bc34d5012e83bb1aa015e46ca77884 100644 (file)
@@ -54,7 +54,7 @@ public class Nshc4ConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc4(nxmNxNshc4Builder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nshc4Convertor = new Nshc4Convertor();
index 55cf9af277586dd9fdcde7330d7f2cf22f523fb7..266345731c6a21118d72555314810380cc953d0e 100644 (file)
@@ -54,7 +54,7 @@ public class NsiConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNsi(nxmNxNsiBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nsiConvertor = new NsiConvertor();
index f52fceb926bd3372a985e49f2c307b3cc046aec3..3fe727fb8ff4cb82e5ef68e1ab43b8c8e1e02dd4 100644 (file)
@@ -54,7 +54,7 @@ public class NspConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNsp(nxmNxNspBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         nspConvertor = new NspConvertor();
index 8b0f7ed053585ae5ad912f663d69ac80fb0d06ba..ea49b245a7a534f52ab6b170dd821e1bcfff1624 100644 (file)
@@ -58,7 +58,7 @@ public class TcpDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpDst(nxmOfTcpDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tcpDstConvertor = new TcpDstConvertor();
index 6bee196ea1d4042ce5242b976431347938673ddc..3cb536215a26117cccae9a9f872b7bb37f682ee0 100644 (file)
@@ -58,7 +58,7 @@ public class TcpSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpSrc(nxmOfTcpSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tcpSrcConvertor = new TcpSrcConvertor();
index 7f8a48e46592b58e43ee51dca6291d00e306a0fc..12e6ec2a4144838f2fedce54b598ef2cce2677be 100644 (file)
@@ -58,7 +58,7 @@ public class TunIPv4DstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Dst(nxmNxTunIpv4DstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIPv4DstConvertor = new TunIPv4DstConvertor();
index ccfd790f843ee54ce8d1a4fc9e558e2be16ab3e8..bd370c1ef1dbb3561ea28ff148b7cc711ae62d65 100644 (file)
@@ -58,7 +58,7 @@ public class TunIPv4SrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Src(nxmNxTunIpv4SrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIPv4DstConvertor = new TunIPv4SrcConvertor();
index 1a1cb6c0d42adc5870ccccad08485c9eec3856a6..4fde6b6173d26825c4728c8452e97d02b0c5ff0e 100644 (file)
@@ -55,7 +55,7 @@ public class TunIdConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunId(nxmNxTunIdBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIdConvertor = new TunIdConvertor();
index 9eeae22d98461beca3f03046af9b03e74d1a7afc..08b8734900f8b7f3fe609db9a0a896af872287fc 100644 (file)
@@ -58,7 +58,7 @@ public class UdpDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpDst(nxmOfUdpDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         udpDstConvertor = new UdpDstConvertor();
index a4bd524d4f9604a706c3c11df1b57ebd6ea884f8..ed5e149de2ce8cd84cb5ed5f4f13542b30234491 100644 (file)
@@ -58,7 +58,7 @@ public class UdpSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpSrc(nxmOfUdpSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         udpSrcConvertor = new UdpSrcConvertor();
index 788d5ac6753069a976ac0df61c8c3f89c9276b82..1cbc9d5ea7f3eb776fed7289873d7e27478edeaa 100644 (file)
@@ -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());
     }
 
index 3be3103914b392ff75081bfd5fedcd01918ffad7..04f35928379fb7660279583551b85d6f9c200029 100644 (file)
@@ -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<Instruction> 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;
     }
index edf379aa2eafa43feb0b3fa9aea6f586bbf5880c..9b59029469cccfb902eec49573ef49b0f5d86984 100755 (executable)
@@ -86,7 +86,7 @@ public class MeterModInputMessageFactory implements OFSerializer<MeterModInput>,
                     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<? extends ExperimenterMeterBandSubType> meterBandSubType = expIdMeterBand.getSubType();
index 16d24ef17946289179133c39ebc965bb53f32707..6c8c87f10b2a2cf8d8af218cab19a1a48f3c83a3 100644 (file)
@@ -301,7 +301,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
     }
 
     private void writeExperimenterRelatedTableProperty(final ByteBuf output, final TableFeatureProperties property) {
-        long expId = property.getAugmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue();
+        long expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue();
         OFSerializer<TableFeatureProperties> serializer = registry.getSerializer(ExperimenterSerializerKeyFactory
                 .createMultipartRequestTFSerializerKey(EncodeConstants.OF13_VERSION_ID, expId));
         serializer.serialize(property, output);
@@ -313,7 +313,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<MatchEntry> entries = property.getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
+        List<MatchEntry> entries = property.augmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
         if (entries != null) {
             TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory
                     .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
@@ -330,7 +330,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<Action> actions = property.getAugmentation(ActionRelatedTableFeatureProperty.class).getAction();
+        List<Action> actions = property.augmentation(ActionRelatedTableFeatureProperty.class).getAction();
         if (actions != null) {
             TypeKeyMaker<Action> keyMaker = TypeKeyMakerFactory.createActionKeyMaker(EncodeConstants.OF13_VERSION_ID);
             ListSerializer.serializeHeaderList(actions, keyMaker, registry, output);
@@ -346,7 +346,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<NextTableIds> nextTableIds = property.getAugmentation(NextTableRelatedTableFeatureProperty.class)
+        List<NextTableIds> nextTableIds = property.augmentation(NextTableRelatedTableFeatureProperty.class)
                 .getNextTableIds();
         if (nextTableIds != null) {
             for (NextTableIds next : nextTableIds) {
@@ -364,7 +364,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<Instruction> instructions = property.getAugmentation(InstructionRelatedTableFeatureProperty.class)
+        List<Instruction> instructions = property.augmentation(InstructionRelatedTableFeatureProperty.class)
                 .getInstruction();
         if (instructions != null) {
             TypeKeyMaker<Instruction> keyMaker = TypeKeyMakerFactory
index 1a7a115bb988a13fa67e738a1286eac97baa0ab3..cdbd12d7107e16c275007154c573bc953ffee03e 100644 (file)
@@ -325,7 +325,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<Instruction> instructions = property.getAugmentation(
+        List<Instruction> instructions = property.augmentation(
                 InstructionRelatedTableFeatureProperty.class).getInstruction();
         if (instructions != null) {
             TypeKeyMaker<Instruction> keyMaker = TypeKeyMakerFactory
@@ -343,7 +343,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<NextTableIds> nextTableIds = property.getAugmentation(
+        List<NextTableIds> nextTableIds = property.augmentation(
                 NextTableRelatedTableFeatureProperty.class).getNextTableIds();
         if (nextTableIds != null) {
             for (NextTableIds next : nextTableIds) {
@@ -370,7 +370,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<Action> actions = property.getAugmentation(ActionRelatedTableFeatureProperty.class).getAction();
+        List<Action> actions = property.augmentation(ActionRelatedTableFeatureProperty.class).getAction();
         if (actions != null) {
             TypeKeyMaker<Action> keyMaker = TypeKeyMakerFactory
                     .createActionKeyMaker(EncodeConstants.OF13_VERSION_ID);
@@ -387,7 +387,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<MatchEntry> entries = property.getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
+        List<MatchEntry> entries = property.augmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
         if (entries != null) {
             TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory
                     .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
@@ -400,7 +400,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
 
     private void writeExperimenterRelatedTableProperty(final ByteBuf output,
             final TableFeatureProperties property) {
-        long expId = property.getAugmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue();
+        long expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue();
         OFSerializer<TableFeatureProperties> serializer = registry.getSerializer(
                 ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(
                         EncodeConstants.OF13_VERSION_ID, expId));
index db0d2e3d308ca2ee5866aa92307c872e9bffff0b..b1ecb6638d4a21ba6e72c9bfd580ca951eafca51 100644 (file)
@@ -48,7 +48,7 @@ public class OF10QueueGetConfigReplyMessageFactory implements OFSerializer<GetQu
                 queuePropertyBuff.writeShort(EncodeConstants.EMPTY_LENGTH);
                 queuePropertyBuff.writeZero(4);
                 if (queueProperty.getProperty() == QueueProperties.OFPQTMINRATE) {
-                    RateQueueProperty body = queueProperty.getAugmentation(RateQueueProperty.class);
+                    RateQueueProperty body = queueProperty.augmentation(RateQueueProperty.class);
                     queuePropertyBuff.writeShort(body.getRate().intValue());
                     queuePropertyBuff.writeZero(QUEUE_PROPERTY_PADDING);
                 }
index df28600025ef83affe19adbaec5f09ce09e65831..274cae5183ae7811aa21a9af560b732b3989a84b 100644 (file)
@@ -54,10 +54,10 @@ public class QueueGetConfigReplyMessageFactory implements OFSerializer<GetQueueC
                 switch (property.getProperty()) {
                     case OFPQTMINRATE:
                     case OFPQTMAXRATE:
-                        serializeRateBody(property.getAugmentation(RateQueueProperty.class), propertyBuff);
+                        serializeRateBody(property.augmentation(RateQueueProperty.class), propertyBuff);
                         break;
                     case OFPQTEXPERIMENTER:
-                        serializeExperimenterBody(property.getAugmentation(ExperimenterIdQueueProperty.class),
+                        serializeExperimenterBody(property.augmentation(ExperimenterIdQueueProperty.class),
                                 propertyBuff);
                         break;
                     default:
index ad4da37b45d1594886a74ac87cdcf117cd2d1243..ab61d0fbb2da1e1ec31e0f040020ec0dc86e1d16 100644 (file)
@@ -24,7 +24,7 @@ public class OnfOxmTcpFlagsSerializer extends AbstractOxmExperimenterMatchEntryS
     public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
         ExperimenterIdCase expCase = serializeExperimenterId(entry, outBuffer);
-        TcpFlags tcpFlags = expCase.getAugmentation(TcpFlagsContainer.class).getTcpFlags();
+        TcpFlags tcpFlags = expCase.augmentation(TcpFlagsContainer.class).getTcpFlags();
         outBuffer.writeShort(tcpFlags.getFlags());
         if (entry.isHasMask()) {
             outBuffer.writeBytes(tcpFlags.getMask());
index d17644ce7d696468002bd7a4725f50b46f036873..415f58fdfbe07a4791bf91b75defd37eac3e6377 100644 (file)
@@ -71,8 +71,8 @@ public class OF10QueueGetConfigReplyMessageFactoryTest {
                 queue2.getQueueProperty().get(0).getProperty());
         Assert.assertEquals("Wrong queue - wrong property", QueueProperties.OFPQTMINRATE,
                 queue2.getQueueProperty().get(1).getProperty());
-        RateQueueProperty rate1 = queue2.getQueueProperty().get(0).getAugmentation(RateQueueProperty.class);
-        RateQueueProperty rate2 = queue2.getQueueProperty().get(1).getAugmentation(RateQueueProperty.class);
+        RateQueueProperty rate1 = queue2.getQueueProperty().get(0).augmentation(RateQueueProperty.class);
+        RateQueueProperty rate2 = queue2.getQueueProperty().get(1).augmentation(RateQueueProperty.class);
         Assert.assertEquals("Wrong queue - wrong property rate", 32, rate1.getRate().intValue());
         Assert.assertEquals("Wrong queue - wrong property rate", 48, rate2.getRate().intValue());
     }
index ace1243325713a7b8092db6e4e7ebd6a6ff5e6a1..de679d9ef8cebcbf7d225244fccdae131d1b44bf 100644 (file)
@@ -155,7 +155,7 @@ public class MultipartReplyTableFeaturesTest {
         TableFeatureProperties property = feature.getTableFeatureProperties().get(2);
         Assert.assertEquals("Wrong property type", TableFeaturesPropType.OFPTFPTNEXTTABLES,
                 property.getType());
-        List<NextTableIds> tableIds = property.getAugmentation(NextTableRelatedTableFeatureProperty.class)
+        List<NextTableIds> 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());
index da8646bd3973cff4fc47cd76d2ef811ed9261826..4badfd94b7cbfecdfb35e4a5a28ad7beb2219e45 100644 (file)
@@ -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);
     }
index cac11f9551e61288431159e5235b1a49800d05d2..c382b5b2280030237ddbdba21df734effd2d3a37 100644 (file)
@@ -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);
 
index 8470f299d1fb17275c95c27edba7dbe40f8dd52b..8ab3bbe2a4d723c6637ceadd1056a80e1b974dab 100644 (file)
@@ -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());
index 1adf381f778f5b5bd0b057552c35446f1cc2b662..02e7c4060d1837c2b7d49b0d11b28944ae1fc570 100644 (file)
@@ -169,7 +169,7 @@ public class OpenFlowProviderConfigImpl implements OpenflowProviderConfig {
 
     @Override
     public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
-            .openflow.provider.config.rev160510.OpenflowProviderConfig>> E getAugmentation(
+            .openflow.provider.config.rev160510.OpenflowProviderConfig>> E augmentation(
                     java.lang.Class<E> augmentationType) {
         return null;
     }
index 528601939c5d8623ef841673885549dd6e905e4f..fa5dad912b79b6c6ea7114e9e0744db367b8b3c9 100644 (file)
@@ -75,7 +75,7 @@ public class FlowStatsMultipartWriter extends AbstractMultipartWriter<FlowAndSta
                                     .child(Flow.class, key),
                             flow
                                     .setId(key.getId())
-                                    .setKey(key)
+                                    .withKey(key)
                                     .build(),
                             withParents);
                 }
index b02e24649d30fd89de4c501d92bc961d03a9103f..c1be2a889e975b7f312463c8c4225977f8cb6b3d 100644 (file)
@@ -45,7 +45,7 @@ public class GroupDescMultipartWriter extends AbstractMultipartWriter<GroupDescS
                         .augmentation(FlowCapableNode.class)
                         .child(Group.class, new GroupKey(stat.getGroupId())),
                     new GroupBuilder(stat)
-                        .setKey(new GroupKey(stat.getGroupId()))
+                        .withKey(new GroupKey(stat.getGroupId()))
                         .addAugmentation(NodeGroupStatistics.class, new NodeGroupStatisticsBuilder().build())
                         .build(),
                     withParents);
index 42a8c2ec726bf439e3d59070689af0722cc2812b..ef24c9d0f0044b7fc05761613cd04e0336490ef2 100644 (file)
@@ -45,7 +45,7 @@ public class MeterConfigMultipartWriter extends AbstractMultipartWriter<MeterCon
                         .augmentation(FlowCapableNode.class)
                         .child(Meter.class, new MeterKey(stat.getMeterId())),
                     new MeterBuilder(stat)
-                        .setKey(new MeterKey(stat.getMeterId()))
+                        .withKey(new MeterKey(stat.getMeterId()))
                         .addAugmentation(NodeMeterStatistics.class, new NodeMeterStatisticsBuilder().build())
                         .build(),
                     withParents);
index f4a87bae456ab3fd0cba806a6d88fdddd0ab2810..1780fef09fadde9b53ec526e5ff9d3f97e94bf1d 100644 (file)
@@ -63,7 +63,7 @@ public class QueueStatsMultipartWriter extends AbstractMultipartWriter<QueueIdAn
                                 .augmentation(FlowCapableNodeConnector.class)
                                 .child(Queue.class, new QueueKey(stat.getQueueId())),
                         new QueueBuilder()
-                                .setKey(new QueueKey(stat.getQueueId()))
+                                .withKey(new QueueKey(stat.getQueueId()))
                                 .setQueueId(stat.getQueueId())
                                 .addAugmentation(
                                         FlowCapableNodeConnectorQueueStatisticsData.class,
index b3c8a3445cd038cbbf8616ae6d79d021ca716f64..e32ec38faf1e0366ab09f6c908cf81ba6004d81e 100644 (file)
@@ -350,7 +350,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
                                 OpenflowVersion.get(deviceInfo.getVersion()))));
 
         writeToTransaction(LogicalDatastoreType.OPERATIONAL, iiToNodeConnector, new NodeConnectorBuilder()
-                .setKey(iiToNodeConnector.getKey())
+                .withKey(iiToNodeConnector.getKey())
                 .addAugmentation(FlowCapableNodeConnectorStatisticsData.class, new
                         FlowCapableNodeConnectorStatisticsDataBuilder().build())
                 .addAugmentation(FlowCapableNodeConnector.class, flowCapableNodeConnector)
index 4bf20b8d9b747a7fb226582e4680d421f8e6ab34..17bd7b38b3cdbd09985cd14aae590530daa41cbf 100644 (file)
@@ -67,7 +67,7 @@ public abstract class AbstractActionInstructionDeserializer extends AbstractInst
 
             while ((message.readerIndex() - startIndex) < instrLength) {
                 actions.add(new ActionBuilder()
-                        .setKey(new ActionKey(offset))
+                        .withKey(new ActionKey(offset))
                         .setOrder(offset)
                         .setAction(ActionUtil
                                 .readAction(EncodeConstants.OF13_VERSION_ID, message, registry, actionPath))
index 15e45231d18df063a5f50b30efb42f60edab22c3..6d9c372891e30ee1116356abc5c685adb2363681 100644 (file)
@@ -107,7 +107,7 @@ public class FlowMessageDeserializer implements OFDeserializer<FlowMessage>, Des
                 }
 
                 instructions.add(new InstructionBuilder()
-                        .setKey(new InstructionKey(offset))
+                        .withKey(new InstructionKey(offset))
                         .setOrder(offset)
                         .setInstruction(deserializer.deserialize(message))
                         .build());
index 36efc59854ff996b6adb4120e91cab8ac5e9e0d3..73d1986cb280aae8320cb159c80a2747801f4ee6 100644 (file)
@@ -76,7 +76,7 @@ public class GroupMessageDeserializer implements OFDeserializer<GroupMessage>, 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))
index adfec1d1e8eee33439b5bc2ca7b2b176f3cce9de..694ab0beff9d9460368d45cb4a4ab25e26bf2d21 100644 (file)
@@ -101,7 +101,7 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer<Multi
 
                 while (itemMessage.readerIndex() - startIndex < length) {
                     instructions.add(new InstructionBuilder()
-                            .setKey(new InstructionKey(offset))
+                            .withKey(new InstructionKey(offset))
                             .setOrder(offset)
                             .setInstruction(InstructionUtil
                                     .readInstruction(EncodeConstants.OF13_VERSION_ID, itemMessage, registry))
index 01390f887eaca4fdcba5c35458354dc7f39dcb1a..6d567e9251f64ff47f768a02391fb97cd35e0c29 100644 (file)
@@ -39,7 +39,7 @@ public class MultipartReplyFlowTableStatsDeserializer implements OFDeserializer<
             message.skipBytes(PADDING_IN_TABLE_HEADER);
 
             itemBuilder
-                .setKey(new FlowTableAndStatisticsMapKey(itemBuilder.getTableId()))
+                .withKey(new FlowTableAndStatisticsMapKey(itemBuilder.getTableId()))
                 .setActiveFlows(new Counter32(message.readUnsignedInt()));
 
             final byte[] packetsLooked = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
index b6e37ad0ece0fe12fd80d9b94b5e7fca96cab9ec..ab959bea9e37c37c2bfc3a2f30188030af3715d2 100644 (file)
@@ -54,7 +54,7 @@ public class MultipartReplyGroupDescDeserializer implements OFDeserializer<Multi
 
             message.skipBytes(PADDING_IN_GROUP_DESC_HEADER);
             itemBuilder.setGroupId(new GroupId(message.readUnsignedInt()));
-            itemBuilder.setKey(new GroupDescStatsKey(itemBuilder.getGroupId()));
+            itemBuilder.withKey(new GroupDescStatsKey(itemBuilder.getGroupId()));
 
             final List<Bucket> subItems = new ArrayList<>();
             int actualLength = GROUP_DESC_HEADER_LENGTH;
@@ -65,7 +65,7 @@ public class MultipartReplyGroupDescDeserializer implements OFDeserializer<Multi
 
                 final BucketBuilder bucketBuilder = new BucketBuilder()
                         .setBucketId(new BucketId(bucketKey))
-                        .setKey(new BucketKey(new BucketId(bucketKey)))
+                        .withKey(new BucketKey(new BucketId(bucketKey)))
                         .setWeight(message.readUnsignedShort())
                         .setWatchPort(message.readUnsignedInt())
                         .setWatchGroup(message.readUnsignedInt());
@@ -79,7 +79,7 @@ public class MultipartReplyGroupDescDeserializer implements OFDeserializer<Multi
 
                 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))
index 22ff100a2e13c73d975b3ccbaf23d5db3f98c3c3..d7fe65939ae9334f16e913d6ff5340711255fbd2 100644 (file)
@@ -57,7 +57,7 @@ public class MultipartReplyGroupStatsDeserializer implements OFDeserializer<Mult
             message.readBytes(byteCountg);
 
             itemBuilder
-                .setKey(new GroupStatsKey(itemBuilder.getGroupId()))
+                .withKey(new GroupStatsKey(itemBuilder.getGroupId()))
                 .setPacketCount(new Counter64(new BigInteger(1, packetCountg)))
                 .setByteCount(new Counter64(new BigInteger(1, byteCountg)))
                 .setDuration(new DurationBuilder()
@@ -77,7 +77,7 @@ public class MultipartReplyGroupStatsDeserializer implements OFDeserializer<Mult
 
                 subItems.add(new BucketCounterBuilder()
                     .setBucketId(new BucketId(bucketKey))
-                    .setKey(new BucketCounterKey(new BucketId(bucketKey)))
+                    .withKey(new BucketCounterKey(new BucketId(bucketKey)))
                     .setPacketCount(new Counter64(new BigInteger(1, packetCount)))
                     .setByteCount(new Counter64(new BigInteger(1, byteCount)))
                     .build());
index 808cd3d78ab1b163253569df31de75cef6724eeb..9f3715055694cc3d4a7eecbbbcae598ea4c19e9e 100644 (file)
@@ -119,7 +119,7 @@ public class MultipartReplyMeterConfigDeserializer implements OFDeserializer<Mul
             }
 
             items.add(itemBuilder
-                    .setKey(new MeterConfigStatsKey(itemBuilder.getMeterId()))
+                    .withKey(new MeterConfigStatsKey(itemBuilder.getMeterId()))
                     .setMeterBandHeaders(new MeterBandHeadersBuilder()
                             .setMeterBandHeader(subItems)
                             .build())
index 74f7c29c768e4876e2cd1fac1a8f1a17f94c89b6..d43c6c1e93ab04804aed2d4caf716ea1f0056525 100644 (file)
@@ -48,7 +48,7 @@ public class MultipartReplyMeterStatsDeserializer implements OFDeserializer<Mult
             message.skipBytes(PADDING_IN_METER_STATS_HEADER);
 
             itemBuilder
-                .setKey(new MeterStatsKey(itemBuilder.getMeterId()))
+                .withKey(new MeterStatsKey(itemBuilder.getMeterId()))
                 .setFlowCount(new Counter32(message.readUnsignedInt()));
 
             final byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
@@ -76,7 +76,7 @@ public class MultipartReplyMeterStatsDeserializer implements OFDeserializer<Mult
 
                 subItems.add(new BandStatBuilder()
                     .setBandId(new BandId(bandKey))
-                    .setKey(new BandStatKey(new BandId(bandKey)))
+                    .withKey(new BandStatKey(new BandId(bandKey)))
                     .setPacketBandCount(new Counter64(new BigInteger(1, packetCountB)))
                     .setByteBandCount(new Counter64(new BigInteger(1, byteCountB)))
                     .build());
index 92f44a53f1a72250ec8eb17e6497232b34a9c4db..704a531b6af4456775212e86358e967bc5bfac34 100644 (file)
@@ -71,7 +71,7 @@ public class MultipartReplyPortStatsDeserializer implements OFDeserializer<Multi
             message.readBytes(collisionCount);
 
             items.add(itemBuilder
-                    .setKey(new NodeConnectorStatisticsAndPortNumberMapKey(itemBuilder.getNodeConnectorId()))
+                    .withKey(new NodeConnectorStatisticsAndPortNumberMapKey(itemBuilder.getNodeConnectorId()))
                     .setPackets(new PacketsBuilder()
                             .setReceived(new BigInteger(1, recPack))
                             .setTransmitted(new BigInteger(1, txPack))
index 79ea9bd3f8ac98f612f05a66f301e50f88f4281f..4bd75a06149994e890f6a01b8b402571bbece274 100644 (file)
@@ -47,7 +47,7 @@ public class MultipartReplyQueueStatsDeserializer implements OFDeserializer<Mult
             message.readBytes(txErrors);
 
             items.add(new QueueIdAndStatisticsMapBuilder()
-                .setKey(new QueueIdAndStatisticsMapKey(nodeConnectorId, queueId))
+                .withKey(new QueueIdAndStatisticsMapKey(nodeConnectorId, queueId))
                 .setNodeConnectorId(nodeConnectorId)
                 .setQueueId(queueId)
                 .setTransmittedBytes(new Counter64(new BigInteger(1, txBytes)))
index 772bfc35498dac4d84e4083d7a93c13ac47994d2..77d15a6ba81438ba5a33593dee3a684acec5b4a6 100644 (file)
@@ -91,7 +91,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
             message.readBytes(write);
 
             items.add(itemBuilder
-                    .setKey(new TableFeaturesKey(itemBuilder.getTableId()))
+                    .withKey(new TableFeaturesKey(itemBuilder.getTableId()))
                     .setName(name)
                     .setMetadataMatch(new BigInteger(1, match))
                     .setMetadataWrite(new BigInteger(1, write))
@@ -127,7 +127,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
             final int commonPropertyLength = propertyLength - COMMON_PROPERTY_LENGTH;
             final TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder()
                 .setOrder(order)
-                .setKey(new TableFeaturePropertiesKey(order));
+                .withKey(new TableFeaturePropertiesKey(order));
 
             switch (propType) {
                 case OFPTFPTINSTRUCTIONS:
@@ -319,7 +319,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
         while (message.readerIndex() - startIndex < length) {
             try {
                 instructions.add(new InstructionBuilder()
-                        .setKey(new InstructionKey(offset))
+                        .withKey(new InstructionKey(offset))
                         .setOrder(offset)
                         .setInstruction(InstructionUtil
                                 .readInstructionHeader(EncodeConstants.OF13_VERSION_ID, message, registry))
@@ -343,7 +343,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
         while (message.readerIndex() - startIndex < length) {
             try {
                 actions.add(new ActionBuilder()
-                        .setKey(new ActionKey(offset))
+                        .withKey(new ActionKey(offset))
                         .setOrder(offset)
                         .setAction(ActionUtil.readActionHeader(EncodeConstants.OF13_VERSION_ID, message, registry,
                                 ActionPath.FLOWS_STATISTICS_UPDATE_APPLY_ACTIONS))
index d12680eba399bf9c22f1cda11ef76004cccb5929..f3a6b8aede88d442f49f0eeb70bab06461234ef1 100644 (file)
@@ -269,7 +269,7 @@ public class TableFeaturesMatchFieldDeserializer {
         return Optional
                 .ofNullable(codeToFieldMap.get(key))
                 .map(clazz -> processHeader(message)
-                        .setKey(new SetFieldMatchKey(clazz))
+                        .withKey(new SetFieldMatchKey(clazz))
                         .setMatchType(clazz)
                         .build());
     }
index e658c40a5bf826f666f8105b7378b6652dd1220d..a11f19e6d3cca0239e0c51a8441d424e3f5c8321 100644 (file)
@@ -301,7 +301,7 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
                                                                     .setTag(PUSH_VLAN)
                                                                     .build())
                                                             .build())
-                                                    .setKey(action.getKey())
+                                                    .withKey(action.key())
                                                     .setOrder(action.getOrder() + offset[0])
                                                     .build());
 
index f5f812157ee3f1dc0078a0c1ecec4946d410746a..83fd9b367f2bb688d7d9924365f5b82a09036175 100644 (file)
@@ -285,7 +285,7 @@ public class DeviceFlowRegistryImpl implements DeviceFlowRegistry {
     }
 
     private FlowRegistryKey getExistingKey(final FlowRegistryKey flowRegistryKey) {
-        if (flowRegistryKey.getMatch().getAugmentation(GeneralAugMatchNodesNodeTableFlow.class) == null) {
+        if (flowRegistryKey.getMatch().augmentation(GeneralAugMatchNodesNodeTableFlow.class) == null) {
             if (flowRegistry.containsKey(flowRegistryKey)) {
                 return flowRegistryKey;
             }
index 4ea8dc67da1daa37412c6be8a3eb860fbe1da593..64da79a9d7531c971eb09c84c4347730759d16c6 100644 (file)
@@ -74,8 +74,8 @@ public final class FlowRegistryKeyFactory {
         }
 
         private boolean equalMatch(final Match input) {
-            GeneralAugMatchNodesNodeTableFlow thisAug = match.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class);
-            GeneralAugMatchNodesNodeTableFlow inputAug = input.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class);
+            GeneralAugMatchNodesNodeTableFlow thisAug = match.augmentation(GeneralAugMatchNodesNodeTableFlow.class);
+            GeneralAugMatchNodesNodeTableFlow inputAug = input.augmentation(GeneralAugMatchNodesNodeTableFlow.class);
             if (thisAug != inputAug) {
                 if (thisAug != null) {
                     if (inputAug == null) {
index 470e73bba4baeeefbaef9f60874fcdcb5bc252b4..7c1128b93f64e7c616f94b5f719f19657f8dcf67 100755 (executable)
@@ -183,7 +183,7 @@ public final class StatisticsGatheringUtils {
                         for (final Table tableData : flowCapNodeOpt.get().getTable()) {
                             final Table table = new TableBuilder(tableData).setFlow(Collections.emptyList()).build();
                             final InstanceIdentifier<Table> iiToTable = instanceIdentifier
-                                    .child(Table.class, tableData.getKey());
+                                    .child(Table.class, tableData.key());
                             txFacade.writeToTransaction(LogicalDatastoreType.OPERATIONAL, iiToTable, table);
                         }
                     }
index d59baeadc1f439af5630b6db257175b0925f7c53..a4a8605580120917fda576887b0b5f18583c414e 100644 (file)
@@ -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());
index 624a18566eb0582f46c21762fbc7a191aa086ae6..6aa039669fc43c6f22f39d0801db84280306a79e 100644 (file)
@@ -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());
                     }
index 61b472725449c407aba73ea12ace3c2a0161731b..5d6b5aa483888c530c2a3ca14d11adda4efdcdef 100644 (file)
@@ -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())
index ee4fc5f725c82581598ab7fad9b0c2985f4c43bb..5b40896a9eea888ea2682988ef1b0ff5c9842e8f 100644 (file)
@@ -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()))
index 79a57adfaa3f97377fefd50d1ee1ebab36262fce..e761e829d4e32e04f118a8bec478cece569cdc74 100644 (file)
@@ -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();
                 })
index fc74907d8fcfb9f3f659206dc1953dd6c8749313..d77836c58b0f093314eb6e8caa7081be407b19f7 100644 (file)
@@ -66,159 +66,159 @@ public class TableFeaturesMatchFieldDeserializerTest {
 
         addValues(buffer, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_OP);
         Optional<SetFieldMatch> 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());
     }
index d4e4d87e41303193746105b11cee86c10ca8c8b4..10c404c5f677520d7e091de64668fa223cd96af5 100644 (file)
@@ -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()
index bf2587f508bd5bb97f86b9ec8bf7ff5b2bbf50f9..3cb9e2a319f099e942494e7cace103b2d447637d 100644 (file)
@@ -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()
index 04fccd144786e56764c745f983be4d110979913c..8dfbc076d0714d4d68b42459fd739d4701aef249 100644 (file)
@@ -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)
index f092579cdac1679b62571f0d5eb948de7a8ba56d..5250807445a51ef559e4a3d4261dbc8fa1fd582b 100644 (file)
@@ -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)
index d89f30c72ec78e0653fcb088144d9238d0775fbd..4fddccaeeb961e0a3dfb1712ba4585094779de90 100644 (file)
@@ -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())
index e4ff8c1b4110e877720c0f7a22d8a314b1052dcc..ce2f247d30e0d19c975aa9699d8adc07bc4c4e31 100644 (file)
@@ -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<Action> actionList = new ArrayList<Action>();
         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<Instruction> instructions = new ArrayList<Instruction>();
         instructions.add(ib.build());
-        ib.setKey(new InstructionKey(0));
+        ib.withKey(new InstructionKey(0));
         isb.setInstruction(instructions);
         return isb;
     }
index 9b26310f4f2bbc35dafa681709640fbac25c40dd..5c69627baa3e28cdb4a3af2ecf91835400e5a799 100644 (file)
@@ -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<>()));
 
index 9e76d28ad1d7e63d2d4a22a04529589dc78192c0..c82a569469c7837a493822901d3bab13210ca24d 100644 (file)
@@ -74,7 +74,7 @@ public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>,
                         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<List<GroupDesc>,
             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<List<GroupDesc>,
             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());
         }
index 792492d4d4cfbbb9661d8eb69f1cddfda0bd82b1..8e7a0ecd73ce2db9f1e4c89196442bfff6440a49 100644 (file)
@@ -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());
         }
 
index 800b32661f13ac82d2c4402041c20dcf96eec3f3..dbcdc32a3650d7b81bc29680f7ff011f3efbb287 100644 (file)
@@ -68,7 +68,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
         for (MeterConfig meterConfig : source) {
             MeterConfigStatsBuilder meterConfigStatsBuilder = new MeterConfigStatsBuilder();
             meterConfigStatsBuilder.setMeterId(new MeterId(meterConfig.getMeterId().getValue()));
-            meterConfigStatsBuilder.setKey(new MeterConfigStatsKey(meterConfigStatsBuilder.getMeterId()));
+            meterConfigStatsBuilder.withKey(new MeterConfigStatsKey(meterConfigStatsBuilder.getMeterId()));
             MeterBandHeadersBuilder meterBandHeadersBuilder = new MeterBandHeadersBuilder();
             List<Bands> bands = meterConfig.getBands();
 
@@ -94,7 +94,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
                     meterBandHeaderBuilder.setBandBurstSize(dropBand.getBurstSize());
                     meterBandHeaderBuilder.setBandRate(dropBand.getRate());
                     BandId bandId = new BandId((long) bandKey);
-                    meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
+                    meterBandHeaderBuilder.withKey(new MeterBandHeaderKey(bandId));
                     meterBandHeaderBuilder.setBandId(bandId);
 
                     MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
@@ -114,7 +114,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
                     meterBandHeaderBuilder.setBandBurstSize(dscpRemarkBand.getBurstSize());
                     meterBandHeaderBuilder.setBandRate(dscpRemarkBand.getRate());
                     BandId bandId = new BandId((long) bandKey);
-                    meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
+                    meterBandHeaderBuilder.withKey(new MeterBandHeaderKey(bandId));
                     meterBandHeaderBuilder.setBandId(bandId);
 
                     MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
@@ -133,7 +133,7 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
                     meterBandHeaderBuilder.setBandBurstSize(experimenterBand.getBurstSize());
                     meterBandHeaderBuilder.setBandRate(experimenterBand.getRate());
                     BandId bandId = new BandId((long) bandKey);
-                    meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
+                    meterBandHeaderBuilder.withKey(new MeterBandHeaderKey(bandId));
                     meterBandHeaderBuilder.setBandId(bandId);
 
                     MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
index 62bd3c6aa9170833cd731215e2d064ee5f5d5ae6..39d1dc7141a7cb875b6d0e82963c8b1a318c4647 100644 (file)
@@ -76,7 +76,7 @@ public class MeterStatsResponseConvertor extends Convertor<
             salMeterStats.setFlowCount(new Counter32(meterStats.getFlowCount()));
             salMeterStats.setMeterId(new MeterId(meterStats.getMeterId().getValue()));
             salMeterStats.setPacketInCount(new Counter64(meterStats.getPacketInCount()));
-            salMeterStats.setKey(new MeterStatsKey(salMeterStats.getMeterId()));
+            salMeterStats.withKey(new MeterStatsKey(salMeterStats.getMeterId()));
 
             List<MeterBandStats> 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());
index b8a9fddbc2d763d0436b797c5c0d16916312929c..da739a6784dec014d1477addaff3006f07054400 100644 (file)
@@ -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<Short> 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<? extends MatchField> ofMatchField = currMatch.getOxmMatchField();
 
index a55570cca1de804d347a4c1ddb7b70854d475d6e..8f8ebe4c9b4cd2b69df55a94ee6081b7fc2dc231 100644 (file)
@@ -511,7 +511,7 @@ public class FlowConvertor extends Convertor<Flow, List<FlowModInputBuilder>, 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<Flow, List<FlowModInputBuilder>, Ve
             }
 
             instructionBuilder
-                    .setKey(srcInstruction.getKey())
+                    .withKey(srcInstruction.key())
                     .setOrder(srcInstruction.getOrder());
             targetInstructionList.add(instructionBuilder.build());
 
index 58c1627a23c2bfbc34fea4f32da9d04f7d7576d3..817b81bee1465b08f4bcd1458c09682777ac533e 100644 (file)
@@ -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++;
index 0d06b0183d124ab9336d35b3b40992f13af4f093..6691d75d2d767b2a74fbdb229cad11c8b9b38b39 100644 (file)
@@ -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());
index 951614ccf7024d85e15459ccc880d7309b450485..b061b9382d8c50f9584b90cbae75d9cf9a4ead6f 100644 (file)
@@ -85,7 +85,7 @@ public class FlowStatsResponseConvertor extends Convertor<List<FlowStats>, List<
 
         InstructionBuilder instBuilder = new InstructionBuilder();
         instBuilder.setInstruction(applyActionsCaseBuilder.build());
-        instBuilder.setKey(new InstructionKey(0));
+        instBuilder.withKey(new InstructionKey(0));
         instBuilder.setOrder(0);
         List<Instruction> salInstructionList = new ArrayList<>();
         salInstructionList.add(instBuilder.build());
index 60a87ebe3312733c5f3ecb7243bbd7eadf1543d9..4cf16d443aac2ea9f27f7e07f20954363a4eaf77 100644 (file)
@@ -34,7 +34,7 @@ public class OfToSalExperimenterIdCase extends ConvertorCase<ExperimenterIdCase,
 
         if (data.getOxmMatchField().equals(TcpFlags.class)) {
             final TcpFlagsMatchBuilder tcpFlagsMatchBuilder = data.getTcpFlagsMatchBuilder();
-            final TcpFlagsContainer tcpFlagsContainer = source.getAugmentation(TcpFlagsContainer.class);
+            final TcpFlagsContainer tcpFlagsContainer = source.augmentation(TcpFlagsContainer.class);
 
             if (tcpFlagsContainer != null) {
                 org.opendaylight.yang.gen.v1.urn.opendaylight.openflow
index 6c7d470871310945cacd10d5b3b22c3e6834357f..f66a6e2a47080c2821651edf92d3caeae9869413 100644 (file)
@@ -78,7 +78,7 @@ public class GroupDescStatsResponseConvertorTest {
         GroupDescStats stat = statsList.get(0);
         Assert.assertEquals("Wrong type", GroupTypes.GroupAll, stat.getGroupType());
         Assert.assertEquals("Wrong group-id", 42, stat.getGroupId().getValue().intValue());
-        Assert.assertEquals("Wrong key", 42, stat.getKey().getGroupId().getValue().intValue());
+        Assert.assertEquals("Wrong key", 42, stat.key().getGroupId().getValue().intValue());
         Assert.assertEquals("Wrong buckets size", 0, stat.getBuckets().getBucket().size());
     }
 
@@ -178,12 +178,12 @@ public class GroupDescStatsResponseConvertorTest {
         GroupDescStats stat = statsList.get(0);
         Assert.assertEquals("Wrong type", GroupTypes.GroupFf, stat.getGroupType());
         Assert.assertEquals("Wrong group-id", 42, stat.getGroupId().getValue().intValue());
-        Assert.assertEquals("Wrong key", 42, stat.getKey().getGroupId().getValue().intValue());
+        Assert.assertEquals("Wrong key", 42, stat.key().getGroupId().getValue().intValue());
         Assert.assertEquals("Wrong buckets size", 1, stat.getBuckets().getBucket().size());
 
         // Test first bucket for first group desc
         Bucket bucket = stat.getBuckets().getBucket().get(0);
-        Assert.assertEquals("Wrong type", 0, bucket.getKey().getBucketId().getValue().intValue());
+        Assert.assertEquals("Wrong type", 0, bucket.key().getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 0, bucket.getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 16, bucket.getWeight().intValue());
         Assert.assertEquals("Wrong type", 168, bucket.getWatchGroup().intValue());
@@ -203,12 +203,12 @@ public class GroupDescStatsResponseConvertorTest {
         stat = statsList.get(1);
         Assert.assertEquals("Wrong type", GroupTypes.GroupIndirect, stat.getGroupType());
         Assert.assertEquals("Wrong group-id", 50, stat.getGroupId().getValue().intValue());
-        Assert.assertEquals("Wrong key", 50, stat.getKey().getGroupId().getValue().intValue());
+        Assert.assertEquals("Wrong key", 50, stat.key().getGroupId().getValue().intValue());
         Assert.assertEquals("Wrong buckets size", 2, stat.getBuckets().getBucket().size());
 
         // Test first bucket for second group desc
         bucket = stat.getBuckets().getBucket().get(0);
-        Assert.assertEquals("Wrong type", 0, bucket.getKey().getBucketId().getValue().intValue());
+        Assert.assertEquals("Wrong type", 0, bucket.key().getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 0, bucket.getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 100, bucket.getWeight().intValue());
         Assert.assertEquals("Wrong type", 400, bucket.getWatchGroup().intValue());
@@ -235,7 +235,7 @@ public class GroupDescStatsResponseConvertorTest {
 
         // Test second bucket for second group desc
         bucket = stat.getBuckets().getBucket().get(1);
-        Assert.assertEquals("Wrong type", 1, bucket.getKey().getBucketId().getValue().intValue());
+        Assert.assertEquals("Wrong type", 1, bucket.key().getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 1, bucket.getBucketId().getValue().intValue());
         Assert.assertEquals("Wrong type", 5, bucket.getWeight().intValue());
         Assert.assertEquals("Wrong type", 15, bucket.getWatchGroup().intValue());
index 188ef9f18756ad7dee87f6d7452f8e0e58ac719a..5f065b3df274780da76685a7087e431782fc190a 100644 (file)
@@ -123,7 +123,7 @@ public class GroupStatsResponseConvertorTest {
         org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.statistics.reply
                 .GroupStats stat = salGroupStats.get(0);
         Assert.assertEquals("Wrong group-id", 42, stat.getGroupId().getValue().intValue());
-        Assert.assertEquals("Wrong key", 42, stat.getKey().getGroupId().getValue().intValue());
+        Assert.assertEquals("Wrong key", 42, stat.key().getGroupId().getValue().intValue());
         Assert.assertEquals("Wrong ref-count", 24, stat.getRefCount().getValue().intValue());
         Assert.assertEquals("Wrong packet count", 54321, stat.getPacketCount().getValue().intValue());
         Assert.assertEquals("Wrong byte count", 12345, stat.getByteCount().getValue().intValue());
@@ -132,7 +132,7 @@ public class GroupStatsResponseConvertorTest {
         Assert.assertEquals("Wrong bucket stats", 0, stat.getBuckets().getBucketCounter().size());
         stat = salGroupStats.get(1);
         Assert.assertEquals("Wrong group-id", 4, stat.getGroupId().getValue().intValue());
-        Assert.assertEquals("Wrong key", 4, stat.getKey().getGroupId().getValue().intValue());
+        Assert.assertEquals("Wrong key", 4, stat.key().getGroupId().getValue().intValue());
         Assert.assertEquals("Wrong ref-count", 6, stat.getRefCount().getValue().intValue());
         Assert.assertEquals("Wrong packet count", 5, stat.getPacketCount().getValue().intValue());
         Assert.assertEquals("Wrong byte count", 1, stat.getByteCount().getValue().intValue());
index 4d71af90f4684eb03b8d59bba4974a7850806a39..8910138351acf8cc09f2ea8af452b8df659fff53 100644 (file)
@@ -175,7 +175,7 @@ public class MeterConvertorTest {
                 assertEquals(expRate,
                         (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getRate());
                 ExperimenterIdMeterBand expBand = ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter()
-                        .getAugmentation(ExperimenterIdMeterBand.class);
+                        .augmentation(ExperimenterIdMeterBand.class);
                 assertEquals(expExperimenter, (long) expBand.getExperimenter().getValue());
             }
         }
@@ -308,7 +308,7 @@ public class MeterConvertorTest {
                 assertEquals(expRate,
                         (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getRate());
                 ExperimenterIdMeterBand expBand = ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter()
-                        .getAugmentation(ExperimenterIdMeterBand.class);
+                        .augmentation(ExperimenterIdMeterBand.class);
                 assertEquals(expExperimenter, (long) expBand.getExperimenter().getValue());
             }
         }
@@ -447,7 +447,7 @@ public class MeterConvertorTest {
                 assertEquals((long) 22,
                         (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getRate());
                 ExperimenterIdMeterBand expBand = ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter()
-                        .getAugmentation(ExperimenterIdMeterBand.class);
+                        .augmentation(ExperimenterIdMeterBand.class);
                 assertEquals((long) 23, (long) expBand.getExperimenter().getValue());
             }
         }
index 5c5a32ca51bb1241d50a025201af57eac1f21b3c..ade28f7fe50f643bce22286032cefcdd13abe537 100644 (file)
@@ -73,7 +73,7 @@ public class MeterStatsResponseConvertorTest {
         int cnt = 0;
         for (MeterStats meterStats : meterStatsList) {
             assertEquals(new MeterStatsKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918
-                    .MeterId((long) cnt)).getMeterId(), meterStats.getKey().getMeterId());
+                    .MeterId((long) cnt)).getMeterId(), meterStats.key().getMeterId());
             assertEquals(BigInteger.valueOf(cnt), meterStats.getByteInCount().getValue());
             assertEquals(new Long(1000 * cnt), meterStats.getDuration().getNanosecond().getValue());
             assertEquals(new Long(10 * cnt), meterStats.getDuration().getSecond().getValue());
index b3a7bf6ef2a51b88589a010bbd09cfaa40faeb3d..416ce84673760cff8d33c42a42242cb9f14eeffb 100644 (file)
@@ -117,7 +117,7 @@ public class PacketOutConvertorTest {
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(
                 output.build()).build());
         ab.setOrder(0);
-        ab.setKey(new ActionKey(0));
+        ab.withKey(new ActionKey(0));
 
         List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actionList =
                 new ArrayList<>();
index 5067023f5db851999b266807afa7e46551112781..55d1d0e9b3720684148a27dd9c5d917ac3067101 100644 (file)
@@ -329,7 +329,7 @@ public class FlowConvertorTest {
         }
 
         @Override
-        public <E extends Augmentation<AddFlowInput>> E getAugmentation(final Class<E> augmentationType) {
+        public <E extends Augmentation<AddFlowInput>> E augmentation(final Class<E> augmentationType) {
             return null;
         }
 
index 82e3077ae14681ff7a9e9edefdc4173f02c460be..f770f214ef6b1b25d2bcc4687815fe9a63297a1b 100644 (file)
@@ -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<Action> 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())
index 57caeb230597189c1f1687d0501870f198ec261d..7c3a534fc795f7341c58830ffbe6a3446a5ddd49 100644 (file)
@@ -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<Action> 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<Instruction> instructions = new ArrayList<>();
index 44fc12dae87cb0fdebe023ad7f6eff2d8fa90a70..101801a5bb01554eabc72d4b1aa329ea6b60b1d8 100644 (file)
@@ -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<Node> 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<Group> 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<Group> 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<Group> 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<Group> 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<Action> 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<Action> actions = new ArrayList<>();
         actions.add(action.build());
         return actions;
index 7db89be8b0792e391a06a82da2ff1277bd872098..65d33d106d4ef6ecbe1e83686a05f8dd2cb6dcaf 100644 (file)
@@ -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<Node> 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<Flow> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey())
+        InstanceIdentifier<Flow> 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<Flow> path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey())
+        InstanceIdentifier<Flow> 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<Flow> path3 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey())
+        InstanceIdentifier<Flow> 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<Flow> path4 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey())
+        InstanceIdentifier<Flow> 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<Flow> 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<Flow> 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<Flow> 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<Flow> 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<Action> 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();
index b4f0c0fe7883550846af24d6246f15c7e8e0199f..7b4ab775d1ed06fda69eae82d42cca4d86fcacd8 100644 (file)
@@ -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<Node> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Action> 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<Group> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey())
+        InstanceIdentifier<Group> 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<Void> 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<Group> 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);
index 97afbd8600b082582555352bcf6fe6d6213ba501..8218c9d4586ca8c221788a12aa40aaca495b91f8 100644 (file)
@@ -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<Node> 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<Meter> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey())
+        InstanceIdentifier<Meter> 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<Void> commitFuture = modification.submit();
@@ -264,12 +264,12 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
             case 1:
                 createTestMeters("1", "remove");
                 InstanceIdentifier<Meter> 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<Meter> 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<Meter> 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<Meter> 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<Meter> 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<Meter> 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<Meter> 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<Meter> 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<Meter> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey())
+        InstanceIdentifier<Meter> 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<Meter> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey())
+        InstanceIdentifier<Meter> 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<Meter> path2 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.getKey())
+        InstanceIdentifier<Meter> 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);
index dd6eb4bc64e69791b2846fe1542c75697db19c40..264736000bd438404d88313f922ce43be0d3227b 100644 (file)
@@ -64,7 +64,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider {
         int nodeConnectorStatsCount = 0;
         List<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<Node> 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<NodeConnector> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<Node> nodeRef = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey);
 
             ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction();
@@ -115,7 +115,7 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider {
                     List<NodeConnector> ports = node.getNodeConnector();
                     for (NodeConnector nodeConnector2 : ports) {
                         nodeConnectorCount++;
-                        NodeConnectorKey nodeConnectorKey = nodeConnector2.getKey();
+                        NodeConnectorKey nodeConnectorKey = nodeConnector2.key();
                         InstanceIdentifier<FlowCapableNodeConnector> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Table> tables = node.getTable();
                 for (Table table2 : tables) {
-                    TableKey tableKey = table2.getKey();
+                    TableKey tableKey = table2.key();
                     InstanceIdentifier<Table> 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<Flow> flows = table.getFlow();
                             for (Flow flow2 : flows) {
                                 flowCount++;
-                                FlowKey flowKey = flow2.getKey();
+                                FlowKey flowKey = flow2.key();
                                 InstanceIdentifier<Flow> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> nodeRef = InstanceIdentifier.create(Nodes.class)
                     .child(Node.class, nodeKey).augmentation(FlowCapableNode.class);
 
@@ -214,13 +214,13 @@ public class OpenflowpluginStatsTestCommandProvider implements CommandProvider {
                 List<Table> tables = node.getTable();
                 for (Table table2 : tables) {
                     tableCount++;
-                    TableKey tableKey = table2.getKey();
+                    TableKey tableKey = table2.key();
                     InstanceIdentifier<Table> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Group> groups = node.getGroup();
                     for (Group group2 : groups) {
                         groupCount++;
-                        GroupKey groupKey = group2.getKey();
+                        GroupKey groupKey = group2.key();
                         InstanceIdentifier<Group> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Group> groups = node.getGroup();
                     for (Group group2 : groups) {
                         groupCount++;
-                        GroupKey groupKey = group2.getKey();
+                        GroupKey groupKey = group2.key();
                         InstanceIdentifier<Group> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Meter> meters = node.getMeter();
                     for (Meter meter2 : meters) {
                         meterCount++;
-                        MeterKey meterKey = meter2.getKey();
+                        MeterKey meterKey = meter2.key();
                         InstanceIdentifier<Meter> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Meter> meters = node.getMeter();
                     for (Meter meter2 : meters) {
                         meterCount++;
-                        MeterKey meterKey = meter2.getKey();
+                        MeterKey meterKey = meter2.key();
                         InstanceIdentifier<Meter> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> 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<Table> tables = node.getTable();
                 for (Table table2 : tables) {
                     aggregateFlowCount++;
-                    TableKey tableKey = table2.getKey();
+                    TableKey tableKey = table2.key();
                     InstanceIdentifier<Table> 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<Node> nodes = getNodes();
         for (Node node2 : nodes) {
             descCount++;
-            NodeKey nodeKey = node2.getKey();
+            NodeKey nodeKey = node2.key();
             InstanceIdentifier<FlowCapableNode> nodeRef = InstanceIdentifier.create(Nodes.class)
                     .child(Node.class, nodeKey).augmentation(FlowCapableNode.class);
             ReadOnlyTransaction readOnlyTransaction = dataProviderService.newReadOnlyTransaction();
index dbb8d607f8e2003b1ea4170ac67bfcaf2f745cf4..751eb532d89be6f88aabf1f149baea4015039f0c 100644 (file)
@@ -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<Node> 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<Instruction> 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<Instruction> 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<TableFeatures, TableFeaturesKey> 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);
index 5b4a1695aab1e9c6b8694bd88c4683de50be357d..da2077be716913984b37ff80a381bef35cc64b98 100644 (file)
@@ -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<Node> 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<Action> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Action> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Instruction> 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<Flow> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.getKey())
+        final InstanceIdentifier<Flow> 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<Void> commitFuture = modification.submit();
         Futures.addCallback(commitFuture, new FutureCallback<Void>() {
@@ -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<Flow> 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);