TSC-101: Fixup Augmentable and Identifiable methods change 21/72021/4
authorVishal Thapar <vthapar@redhat.com>
Tue, 15 May 2018 17:07:23 +0000 (22:37 +0530)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 4 Jun 2018 12:11:43 +0000 (14:11 +0200)
This is a fixup of the change in binding codegen, adjusting:
- getKey() -> key()
- setKey() -> withKey()
- getAugmentation() -> augmentation()

Change-Id: I5158dd9f133470150c80bf5cc20766c58fdbbf4b
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
79 files changed:
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/GlobalConfigOperationalChangeGetter.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationManager.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationTask.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/SwitchConfigOperationalChangeGetter.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/AbstractTransactCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/HwvtepOperationalState.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepGlobalRemoveCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DependencyQueueTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TestBuilders.java
hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalState.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEvent.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointDeleteCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalStateTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTaskTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommandTest.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java
utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsyncTest.java
utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java

index c6a52d9a2749493120c98561602018d37c81a32f..8a7514aa43864c8f5fcdb78b01f011b98e9c520c 100644 (file)
@@ -266,8 +266,8 @@ public class HwvtepConnectionManager implements OvsdbConnectionListener, AutoClo
 
     public HwvtepConnectionInstance getConnectionInstance(Node node) {
         Preconditions.checkNotNull(node);
-        HwvtepGlobalAugmentation hwvtepGlobal = node.getAugmentation(HwvtepGlobalAugmentation.class);
-        PhysicalSwitchAugmentation switchNode = node.getAugmentation(PhysicalSwitchAugmentation.class);
+        HwvtepGlobalAugmentation hwvtepGlobal = node.augmentation(HwvtepGlobalAugmentation.class);
+        PhysicalSwitchAugmentation switchNode = node.augmentation(PhysicalSwitchAugmentation.class);
         if (hwvtepGlobal != null) {
             if (hwvtepGlobal.getConnectionInfo() != null) {
                 return getConnectionInstance(hwvtepGlobal.getConnectionInfo());
@@ -505,7 +505,7 @@ public class HwvtepConnectionManager implements OvsdbConnectionListener, AutoClo
                     public void onSuccess(@Nonnull Optional<Node> node) {
                         if (node.isPresent()) {
                             HwvtepGlobalAugmentation augmentation = node.get()
-                                    .getAugmentation(HwvtepGlobalAugmentation.class);
+                                    .augmentation(HwvtepGlobalAugmentation.class);
                             if (augmentation == null || augmentation.getConnectionInfo() == null) {
                                 return;
                             }
index 2305bae5e3c6c95c253bbfdafcb110b44c2a0040..2a0442bc8cf201c2079a3ce4da86940389abd0e1 100644 (file)
@@ -116,7 +116,7 @@ public class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener
             final DataObjectModification<Node> mod = change.getRootNode();
             Node node = getCreated(mod);
             if (node != null) {
-                HwvtepGlobalAugmentation hwvtepGlobal = node.getAugmentation(HwvtepGlobalAugmentation.class);
+                HwvtepGlobalAugmentation hwvtepGlobal = node.augmentation(HwvtepGlobalAugmentation.class);
                 // We can only connect if user configured connection info
                 if (hwvtepGlobal != null && hwvtepGlobal.getConnectionInfo() != null) {
                     ConnectionInfo connection = hwvtepGlobal.getConnectionInfo();
@@ -143,8 +143,8 @@ public class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener
             Node updated = getUpdated(mod);
             if (updated != null) {
                 Node original = getOriginal(mod);
-                HwvtepGlobalAugmentation hgUpdated = updated.getAugmentation(HwvtepGlobalAugmentation.class);
-                HwvtepGlobalAugmentation hgOriginal = original.getAugmentation(HwvtepGlobalAugmentation.class);
+                HwvtepGlobalAugmentation hgUpdated = updated.augmentation(HwvtepGlobalAugmentation.class);
+                HwvtepGlobalAugmentation hgOriginal = original.augmentation(HwvtepGlobalAugmentation.class);
                 // Check if user has updated connection information
                 if (hgUpdated != null && hgOriginal != null && hgUpdated.getConnectionInfo() != null
                                 && !hgUpdated.getConnectionInfo().equals(hgOriginal.getConnectionInfo())) {
@@ -187,7 +187,7 @@ public class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener
             final DataObjectModification<Node> mod = change.getRootNode();
             Node deleted = getRemoved(mod);
             if (deleted != null) {
-                HwvtepGlobalAugmentation hgDeleted = deleted.getAugmentation(HwvtepGlobalAugmentation.class);
+                HwvtepGlobalAugmentation hgDeleted = deleted.augmentation(HwvtepGlobalAugmentation.class);
                 if (hgDeleted != null) {
                     try {
                         hcm.disconnect(hgDeleted);
@@ -275,7 +275,7 @@ public class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener
                     result.get(connection).add(change);
                 }
             } else {
-                LOG.warn("Failed to get the connection of changed node: {}", node.getKey().getNodeId().getValue());
+                LOG.warn("Failed to get the connection of changed node: {}", node.key().getNodeId().getValue());
             }
         }
         LOG.trace("Connection Change Map: {}", result);
index 6e90b233aba42becc1d872fe8c3ee3c1e3b9c97f..259df1fb0d2fadb20fef7c52cdd28ef93dae3cd8 100644 (file)
@@ -142,7 +142,7 @@ public final class HwvtepSouthboundMapper {
     public static InstanceIdentifier<VlanBindings> createInstanceIdentifier(HwvtepConnectionInstance client,
             InstanceIdentifier<TerminationPoint> tpPath, VlanBindings vlanBindings) {
         return tpPath.augmentation(HwvtepPhysicalPortAugmentation.class).child(VlanBindings.class,
-                new VlanBindingsKey(vlanBindings.getKey()));
+                new VlanBindingsKey(vlanBindings.key()));
 
     }
 
index 22708262ac559cb4564cc9546f899b0197d2f947..a6598d7fd03e4814e574863f436d99701db1588a 100644 (file)
@@ -110,7 +110,7 @@ public final class HwvtepSouthboundUtil {
                 if (node instanceof HwvtepGlobalAugmentation) {
                     hwvtepNode = (HwvtepGlobalAugmentation) node;
                 } else if (node != null) {
-                    hwvtepNode = node.getAugmentation(HwvtepGlobalAugmentation.class);
+                    hwvtepNode = node.augmentation(HwvtepGlobalAugmentation.class);
                 }
                 if (hwvtepNode != null) {
                     return Optional.of(hwvtepNode);
@@ -202,7 +202,7 @@ public final class HwvtepSouthboundUtil {
     }
 
     public static Integer getRemotePort(Node node) {
-        HwvtepGlobalAugmentation augmentation = node.getAugmentation(HwvtepGlobalAugmentation.class);
+        HwvtepGlobalAugmentation augmentation = node.augmentation(HwvtepGlobalAugmentation.class);
         if (augmentation != null && augmentation.getConnectionInfo() != null) {
             return augmentation.getConnectionInfo().getRemotePort().getValue();
         }
index 41ad9072bbb7368f206f5bcaa0179ade2b7f5716..9773469436ab45d44f333181c6a313d06a79802b 100644 (file)
@@ -34,8 +34,8 @@ public final class GlobalConfigOperationalChangeGetter {
         NodeBuilder newNodeBuilder = getNodeBuilderFromNode(configNode);
         NodeBuilder oldNodeBuilder = getNodeBuilderFromNode(opNode);
 
-        HwvtepGlobalAugmentationBuilder newAugmentation = getAugmentationFromNode(configNode);
-        HwvtepGlobalAugmentationBuilder oldAugmentation = getAugmentationFromNode(opNode);
+        HwvtepGlobalAugmentationBuilder newAugmentation = augmentationFromNode(configNode);
+        HwvtepGlobalAugmentationBuilder oldAugmentation = augmentationFromNode(opNode);
 
         //fire removal of local ucast macs so that logical switches will be deleted
         fillLocalMacsToBeRemoved(oldAugmentation, configNode, opNode);
@@ -59,10 +59,10 @@ public final class GlobalConfigOperationalChangeGetter {
     }
 
     static List<LocalUcastMacs> getLocalUcastMacsToBeRemoved(Node opNode, final Set<String> removedSwitchNames) {
-        if (opNode == null || opNode.getAugmentation(HwvtepGlobalAugmentation.class) == null) {
+        if (opNode == null || opNode.augmentation(HwvtepGlobalAugmentation.class) == null) {
             return null;
         }
-        List<LocalUcastMacs> localUcastMacs = opNode.getAugmentation(HwvtepGlobalAugmentation.class)
+        List<LocalUcastMacs> localUcastMacs = opNode.augmentation(HwvtepGlobalAugmentation.class)
                 .getLocalUcastMacs();
         if (localUcastMacs == null) {
             return null;
@@ -75,10 +75,10 @@ public final class GlobalConfigOperationalChangeGetter {
     }
 
     static List<LocalMcastMacs> getLocalMcastMacsToBeRemoved(Node opNode, final Set<String> removedSwitchNames) {
-        if (opNode == null || opNode.getAugmentation(HwvtepGlobalAugmentation.class) == null) {
+        if (opNode == null || opNode.augmentation(HwvtepGlobalAugmentation.class) == null) {
             return null;
         }
-        List<LocalMcastMacs> localMcastMacs = opNode.getAugmentation(HwvtepGlobalAugmentation.class)
+        List<LocalMcastMacs> localMcastMacs = opNode.augmentation(HwvtepGlobalAugmentation.class)
                 .getLocalMcastMacs();
         if (localMcastMacs == null) {
             return null;
@@ -96,11 +96,11 @@ public final class GlobalConfigOperationalChangeGetter {
         List<LogicalSwitches> cfgLogicalSwitches = new ArrayList<>();
         List<LogicalSwitches> opLogicalSwitches = new ArrayList<>();
 
-        if (opNode != null && opNode.getAugmentation(HwvtepGlobalAugmentation.class) != null) {
-            opLogicalSwitches = opNode.getAugmentation(HwvtepGlobalAugmentation.class).getLogicalSwitches();
+        if (opNode != null && opNode.augmentation(HwvtepGlobalAugmentation.class) != null) {
+            opLogicalSwitches = opNode.augmentation(HwvtepGlobalAugmentation.class).getLogicalSwitches();
         }
-        if (configNode != null && configNode.getAugmentation(HwvtepGlobalAugmentation.class) != null) {
-            cfgLogicalSwitches = configNode.getAugmentation(HwvtepGlobalAugmentation.class).getLogicalSwitches();
+        if (configNode != null && configNode.augmentation(HwvtepGlobalAugmentation.class) != null) {
+            cfgLogicalSwitches = configNode.augmentation(HwvtepGlobalAugmentation.class).getLogicalSwitches();
         }
         if (opLogicalSwitches != null) {
             for (LogicalSwitches ls : opLogicalSwitches) {
@@ -116,11 +116,11 @@ public final class GlobalConfigOperationalChangeGetter {
         return removedSwitchNames;
     }
 
-    static HwvtepGlobalAugmentationBuilder getAugmentationFromNode(Node node) {
+    static HwvtepGlobalAugmentationBuilder augmentationFromNode(Node node) {
         if (node == null) {
             return new HwvtepGlobalAugmentationBuilder();
         }
-        HwvtepGlobalAugmentation src = node.getAugmentation(HwvtepGlobalAugmentation.class);
+        HwvtepGlobalAugmentation src = node.augmentation(HwvtepGlobalAugmentation.class);
         HwvtepGlobalAugmentationBuilder builder = new HwvtepGlobalAugmentationBuilder();
         if (src != null) {
             builder.setLogicalSwitches(src.getLogicalSwitches());
index 5f55a23b4434831a60f2fbad010073dd6772a77f..ed95d7ae8aa7bb8d8e5bbd7b1ddfdd342a3cdb49 100644 (file)
@@ -60,8 +60,8 @@ public class HwvtepReconciliationManager implements ClusteredDataTreeChangeListe
             final DataObjectModification<Node> mod = change.getRootNode();
             Node deleted = getRemoved(mod);
             if (deleted != null) {
-                if (deleted.getAugmentation(HwvtepGlobalAugmentation.class) != null) {
-                    LOG.trace("Cancel config reconciliation for node {}", deleted.getKey());
+                if (deleted.augmentation(HwvtepGlobalAugmentation.class) != null) {
+                    LOG.trace("Cancel config reconciliation for node {}", deleted.key());
                     hcm.stopConfigurationReconciliation(key);
                 }
             }
@@ -73,12 +73,12 @@ public class HwvtepReconciliationManager implements ClusteredDataTreeChangeListe
             DataObjectModification<Node> mod = change.getRootNode();
             Node node = getCreated(mod);
             if (node != null) {
-                PhysicalSwitchAugmentation physicalSwitch = node.getAugmentation(PhysicalSwitchAugmentation.class);
+                PhysicalSwitchAugmentation physicalSwitch = node.augmentation(PhysicalSwitchAugmentation.class);
                 if (physicalSwitch != null) {
                     HwvtepConnectionInstance connection =
                             hcm.getConnectionInstance(physicalSwitch);
                     if (connection != null) {
-                        LOG.trace("Reconcile config for node {}, IP : {}", node.getKey(),
+                        LOG.trace("Reconcile config for node {}, IP : {}", node.key(),
                                 connection.getConnectionInfo().getRemoteAddress());
                         hcm.reconcileConfigurations(connection, node);
                     }
index 939ebef1f1d50bffb1476c269d737eced09fcd05..ab94f6bc0437743cdf7c34733fbc4238dcd8df2c 100644 (file)
@@ -74,13 +74,13 @@ public class HwvtepReconciliationTask extends ReconciliationTask {
         changes.add(change);
 
         if (globalConfigNode != null) {
-            HwvtepGlobalAugmentation augmentation = globalConfigNode.getAugmentation(HwvtepGlobalAugmentation.class);
+            HwvtepGlobalAugmentation augmentation = globalConfigNode.augmentation(HwvtepGlobalAugmentation.class);
             if (augmentation != null) {
                 if (augmentation.getLogicalSwitches() != null) {
                     for (LogicalSwitches logicalSwitches : augmentation.getLogicalSwitches()) {
                         connectionInstance.getDeviceInfo().updateConfigData(LogicalSwitches.class,
                                 nodeId.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class,
-                                        logicalSwitches.getKey()), logicalSwitches);
+                                        logicalSwitches.key()), logicalSwitches);
                     }
                 }
             }
index 17dd3a53175e2cac8453f42b58b01a2fceaf7cc8..9de05bcf169d289e12b7b07b1337a9acf9c7d738 100644 (file)
@@ -68,7 +68,7 @@ public final class SwitchConfigOperationalChangeGetter {
             TerminationPointBuilder terminationPointBuilder = new TerminationPointBuilder(tp);
             terminationPointBuilder.removeAugmentation(HwvtepPhysicalPortAugmentation.class);
 
-            HwvtepPhysicalPortAugmentation augmentation = tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+            HwvtepPhysicalPortAugmentation augmentation = tp.augmentation(HwvtepPhysicalPortAugmentation.class);
             HwvtepPhysicalPortAugmentationBuilder builder = new HwvtepPhysicalPortAugmentationBuilder();
             if (augmentation != null) {
                 builder = new HwvtepPhysicalPortAugmentationBuilder(augmentation);
index 8086cb6c4d6103b8a60377319e16fdf216b26eaf..e4503bbc89d0ca342ff7e85abd988596632bddf1 100644 (file)
@@ -180,14 +180,14 @@ public abstract class AbstractTransactCommand<T extends Identifiable, A extends
         //tobe removed as part of refactoring patch
     }
 
-    protected A getAugmentation(Node node) {
+    protected A augmentation(Node node) {
         if (node == null) {
             return null;
         }
         ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
         Class<? extends Augmentation<Node>> augType =
                 (Class<? extends Augmentation<Node>>) parameterizedType.getActualTypeArguments()[1];
-        Augmentation<Node> augmentation = node.getAugmentation(augType);
+        Augmentation<Node> augmentation = node.augmentation(augType);
         return (A) augmentation;
     }
 
@@ -196,7 +196,7 @@ public abstract class AbstractTransactCommand<T extends Identifiable, A extends
     }
 
     protected List<T> getData(Node node) {
-        A augmentation = getAugmentation(node);
+        A augmentation = augmentation(node);
         if (augmentation != null) {
             List<T> data = getData(augmentation);
             if (data != null) {
@@ -317,7 +317,7 @@ public abstract class AbstractTransactCommand<T extends Identifiable, A extends
             boolean found = false;
             while (it2.hasNext()) {
                 T other = it2.next();
-                found = compareKeyOnly ? Objects.equals(ele.getKey(), other.getKey()) : areEqual(ele, other);
+                found = compareKeyOnly ? Objects.equals(ele.key(), other.key()) : areEqual(ele, other);
                 if (found) {
                     it2.remove();
                     break;
@@ -338,7 +338,7 @@ public abstract class AbstractTransactCommand<T extends Identifiable, A extends
     }
 
     protected boolean areEqual(T obj1, T obj2) {
-        return obj1.getKey().equals(obj2.getKey());
+        return obj1.key().equals(obj2.key());
     }
 
     protected UnMetDependencyGetter getDependencyGetter() {
index d0201a74664d25e7dbc4eb3840f70de520cfd6e5..0ac3b65190a5ff42f39b2e849b14e718fd76bb6c 100644 (file)
@@ -114,7 +114,7 @@ public class HwvtepOperationalState {
                                   final Node psNode) {
         this(db, connectionInstance, changes);
         operationalNodes.put(connectionInstance.getInstanceIdentifier(), globalOperNode);
-        HwvtepGlobalAugmentation globalAugmentation = globalOperNode.getAugmentation(HwvtepGlobalAugmentation.class);
+        HwvtepGlobalAugmentation globalAugmentation = globalOperNode.augmentation(HwvtepGlobalAugmentation.class);
         if (globalAugmentation != null) {
             if (!HwvtepSouthboundUtil.isEmpty(globalAugmentation.getSwitches())) {
                 operationalNodes.put((InstanceIdentifier<Node>)
@@ -145,9 +145,9 @@ public class HwvtepOperationalState {
                 if (readNode.isPresent()) {
                     operationalNodes.put(entry.getKey(), readNode.get());
                     HwvtepGlobalAugmentation hgAugmentation =
-                            readNode.get().getAugmentation(HwvtepGlobalAugmentation.class);
+                            readNode.get().augmentation(HwvtepGlobalAugmentation.class);
                     PhysicalSwitchAugmentation psAugmentation =
-                            readNode.get().getAugmentation(PhysicalSwitchAugmentation.class);
+                            readNode.get().augmentation(PhysicalSwitchAugmentation.class);
                     if (hgAugmentation != null && hgAugmentation.getSwitches() != null) {
                         for (Switches pswitch : hgAugmentation.getSwitches()) {
                             @SuppressWarnings("unchecked")
@@ -184,7 +184,7 @@ public class HwvtepOperationalState {
         Preconditions.checkNotNull(iid);
         Optional<Node> nodeOptional = getGlobalNode(iid);
         if (nodeOptional.isPresent()) {
-            return Optional.fromNullable(nodeOptional.get().getAugmentation(HwvtepGlobalAugmentation.class));
+            return Optional.fromNullable(nodeOptional.get().augmentation(HwvtepGlobalAugmentation.class));
         }
         return Optional.absent();
     }
@@ -193,7 +193,7 @@ public class HwvtepOperationalState {
         Preconditions.checkNotNull(iid);
         Optional<Node> nodeOptional = getGlobalNode(iid);
         if (nodeOptional.isPresent()) {
-            return Optional.fromNullable(nodeOptional.get().getAugmentation(PhysicalSwitchAugmentation.class));
+            return Optional.fromNullable(nodeOptional.get().augmentation(PhysicalSwitchAugmentation.class));
         }
         return Optional.absent();
     }
@@ -219,7 +219,7 @@ public class HwvtepOperationalState {
             }
             if (lswitchList != null) {
                 for (LogicalSwitches lswitch: lswitchList) {
-                    if (lswitch.getKey().equals(logicalSwitchesKey)) {
+                    if (lswitch.key().equals(logicalSwitchesKey)) {
                         return Optional.fromNullable(lswitch);
                     }
                 }
@@ -244,7 +244,7 @@ public class HwvtepOperationalState {
             }
             if (tunnelList != null) {
                 for (Tunnels tunnel: tunnelList) {
-                    if (tunnel.getKey().equals(tunnelsKey)) {
+                    if (tunnel.key().equals(tunnelsKey)) {
                         return Optional.fromNullable(tunnel);
                     }
                 }
@@ -266,7 +266,7 @@ public class HwvtepOperationalState {
             List<TerminationPoint> tpList = nodeOptional.get();
             for (TerminationPoint tp : tpList) {
                 HwvtepPhysicalPortAugmentation hppAugmentation =
-                        tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                        tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                 if (hppAugmentation != null && hppAugmentation.getHwvtepNodeName().equals(hwvtepNodeName)) {
                     return Optional.fromNullable(hppAugmentation);
                 }
@@ -283,7 +283,7 @@ public class HwvtepOperationalState {
             List<TerminationPoint> tpList = nodeOptional.get();
             for (TerminationPoint tp : tpList) {
                 HwvtepPhysicalLocatorAugmentation hppAugmentation =
-                        tp.getAugmentation(HwvtepPhysicalLocatorAugmentation.class);
+                        tp.augmentation(HwvtepPhysicalLocatorAugmentation.class);
                 if (hppAugmentation != null && hppAugmentation.getDstIp().equals(dstIp)
                         && hppAugmentation.getEncapsulationType().equals(encapType)) {
                     return Optional.fromNullable(hppAugmentation);
@@ -297,7 +297,7 @@ public class HwvtepOperationalState {
             getPhysicalLocatorAugmentation(InstanceIdentifier<TerminationPoint> iid) {
         Optional<TerminationPoint> tp = new MdsalUtils(db).readOptional(LogicalDatastoreType.OPERATIONAL, iid);
         if (tp.isPresent()) {
-            return Optional.fromNullable(tp.get().getAugmentation(HwvtepPhysicalLocatorAugmentation.class));
+            return Optional.fromNullable(tp.get().augmentation(HwvtepPhysicalLocatorAugmentation.class));
         }
         return Optional.absent();
     }
@@ -313,7 +313,7 @@ public class HwvtepOperationalState {
             }
             if (macList != null) {
                 for (LocalMcastMacs mac: macList) {
-                    if (mac.getKey().equals(key)) {
+                    if (mac.key().equals(key)) {
                         return Optional.fromNullable(mac);
                     }
                 }
@@ -333,7 +333,7 @@ public class HwvtepOperationalState {
             }
             if (macList != null) {
                 for (RemoteMcastMacs mac: macList) {
-                    if (mac.getKey().equals(key)) {
+                    if (mac.key().equals(key)) {
                         return Optional.fromNullable(mac);
                     }
                 }
@@ -353,7 +353,7 @@ public class HwvtepOperationalState {
             }
             if (macList != null) {
                 for (LocalUcastMacs mac: macList) {
-                    if (mac.getKey().equals(key)) {
+                    if (mac.key().equals(key)) {
                         return Optional.fromNullable(mac);
                     }
                 }
@@ -373,7 +373,7 @@ public class HwvtepOperationalState {
             }
             if (macList != null) {
                 for (RemoteUcastMacs mac: macList) {
-                    if (mac.getKey().equals(key)) {
+                    if (mac.key().equals(key)) {
                         return Optional.fromNullable(mac);
                     }
                 }
@@ -390,7 +390,7 @@ public class HwvtepOperationalState {
             HwvtepGlobalAugmentation hgAugmentation = nodeOptional.get();
             if (hgAugmentation != null && hgAugmentation.getLogicalRouters() != null) {
                 for (LogicalRouters lrouter: hgAugmentation.getLogicalRouters()) {
-                    if (lrouter.getKey().equals(logicalRoutersKey)) {
+                    if (lrouter.key().equals(logicalRoutersKey)) {
                         return Optional.fromNullable(lrouter);
                     }
                 }
index 5224ee686c64ef8e14e77b18bc3acbe30b8b080c..ffad4ed9b968ac0068592cc586fd8f307f847971 100644 (file)
@@ -77,7 +77,7 @@ public class LogicalRouterRemoveCommand extends AbstractTransactCommand<LogicalR
         for (LogicalRouters lrouter: routerList) {
             LOG.debug("Removing logical router named: {}", lrouter.getHwvtepNodeName().getValue());
             Optional<LogicalRouters> operationalRouterOptional =
-                    getOperationalState().getLogicalRouters(instanceIdentifier, lrouter.getKey());
+                    getOperationalState().getLogicalRouters(instanceIdentifier, lrouter.key());
 
             if (operationalRouterOptional.isPresent()
                     && operationalRouterOptional.get().getLogicalRouterUuid() != null) {
@@ -101,6 +101,6 @@ public class LogicalRouterRemoveCommand extends AbstractTransactCommand<LogicalR
 
     @Override
     protected boolean areEqual(final LogicalRouters routers1, final LogicalRouters routers2) {
-        return routers1.getKey().equals(routers2.getKey());
+        return routers1.key().equals(routers2.key());
     }
 }
index 5c40486a0afaf23066e18075f0055f6f2cb9e560..4b641bb66de256c6cbeebb53bf5b069984b59dc1 100644 (file)
@@ -58,11 +58,11 @@ public class LogicalRouterUpdateCommand extends AbstractTransactCommand<LogicalR
             final List<LogicalRouters> routerList) {
         for (LogicalRouters lrouter: routerList) {
             InstanceIdentifier<LogicalRouters> routerKey = instanceIdentifier
-                    .augmentation(HwvtepGlobalAugmentation.class).child(LogicalRouters.class, lrouter.getKey());
+                    .augmentation(HwvtepGlobalAugmentation.class).child(LogicalRouters.class, lrouter.key());
             LOG.debug("Creating logical router named: {}", lrouter.getHwvtepNodeName());
 
             final Optional<LogicalRouters> operationalRouterOptional =
-                    getOperationalState().getLogicalRouters(instanceIdentifier, lrouter.getKey());
+                    getOperationalState().getLogicalRouters(instanceIdentifier, lrouter.key());
             LogicalRouter logicalRouter = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     LogicalRouter.class);
             setDescription(logicalRouter, lrouter);
index d73da13d79d610029c3bd451968928ed186119e6..7bd5cdbaf963261338b45fb0668eca26f53414cf 100644 (file)
@@ -81,7 +81,7 @@ public class LogicalSwitchRemoveCommand extends AbstractTransactCommand<LogicalS
                                      final InstanceIdentifier<Node> nodeIid, final List<LogicalSwitches> lswitchList) {
         for (LogicalSwitches lswitch: lswitchList) {
             InstanceIdentifier<LogicalSwitches> lsKey = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                    .child(LogicalSwitches.class, lswitch.getKey());
+                    .child(LogicalSwitches.class, lswitch.key());
             onConfigUpdate(transaction, nodeIid, lswitch, lsKey);
         }
     }
@@ -146,7 +146,7 @@ public class LogicalSwitchRemoveCommand extends AbstractTransactCommand<LogicalS
 
     @Override
     protected boolean areEqual(LogicalSwitches sw1, LogicalSwitches sw2) {
-        return sw1.getKey().equals(sw2.getKey()) && Objects.equals(sw1.getTunnelKey(), sw2.getTunnelKey());
+        return sw1.key().equals(sw2.key()) && Objects.equals(sw1.getTunnelKey(), sw2.getTunnelKey());
     }
 
     @Override
index 510a2b07518c3a14f29e6ca449c93b239f36aa5b..247d1017d146c3f64480755892fa01b1f04d076e 100644 (file)
@@ -57,7 +57,7 @@ public class LogicalSwitchUpdateCommand extends AbstractTransactCommand<LogicalS
                                      final InstanceIdentifier<Node> nodeIid, final List<LogicalSwitches> lswitchList) {
         for (LogicalSwitches lswitch: lswitchList) {
             InstanceIdentifier<LogicalSwitches> lsKey = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                    .child(LogicalSwitches.class, lswitch.getKey());
+                    .child(LogicalSwitches.class, lswitch.key());
             onConfigUpdate(transaction, nodeIid, lswitch, lsKey);
         }
     }
@@ -148,6 +148,6 @@ public class LogicalSwitchUpdateCommand extends AbstractTransactCommand<LogicalS
 
     @Override
     protected boolean areEqual(LogicalSwitches sw1, LogicalSwitches sw2) {
-        return sw1.getKey().equals(sw2.getKey()) && Objects.equals(sw1.getTunnelKey(), sw2.getTunnelKey());
+        return sw1.key().equals(sw2.key()) && Objects.equals(sw1.getTunnelKey(), sw2.getTunnelKey());
     }
 }
index 811cb20e2c68d490457f48adde063b23479943d7..9e4eb510c9f37738b799ff508f219662e005727f 100644 (file)
@@ -53,7 +53,7 @@ public class McastMacsLocalRemoveCommand extends AbstractTransactCommand<LocalMc
         for (LocalMcastMacs mac: macList) {
             LOG.debug("Removing localMcastMacs, mac address: {}", mac.getMacEntryKey().getValue());
             Optional<LocalMcastMacs> operationalMacOptional =
-                    getOperationalState().getLocalMcastMacs(instanceIdentifier, mac.getKey());
+                    getOperationalState().getLocalMcastMacs(instanceIdentifier, mac.key());
             McastMacsLocal mcastMacsLocal = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     McastMacsLocal.class, null);
             if (operationalMacOptional.isPresent() && operationalMacOptional.get().getMacEntryUuid() != null) {
index b07a193c4f94a0437e7e3df29b2ffa8ddea2e144..8a8ed9bb7f07378340406f92799860db7ba15558 100644 (file)
@@ -55,7 +55,7 @@ public class McastMacsLocalUpdateCommand extends AbstractTransactCommand<LocalMc
         for (LocalMcastMacs localMcastMac: localMcastMacs) {
             LOG.debug("Creating localMcastMac, mac address: {}", localMcastMac.getMacEntryKey().getValue());
             final Optional<LocalMcastMacs> operationalMacOptional =
-                    getOperationalState().getLocalMcastMacs(instanceIdentifier, localMcastMac.getKey());
+                    getOperationalState().getLocalMcastMacs(instanceIdentifier, localMcastMac.key());
             McastMacsLocal mcastMacsLocal = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     McastMacsLocal.class);
             setIpAddress(mcastMacsLocal, localMcastMac);
index af57c2e52343769f9ee13b6c23d06eb7d01cd65f..640f60a439e4e5bdfc3167d4d8a4a27ef4aabf6c 100644 (file)
@@ -73,7 +73,7 @@ public class McastMacsRemoteRemoveCommand extends AbstractTransactCommand<Remote
                                       final InstanceIdentifier<Node> nodeIid, final List<RemoteMcastMacs> macList) {
         for (RemoteMcastMacs mac : macList) {
             InstanceIdentifier<RemoteMcastMacs> macKey = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                    .child(RemoteMcastMacs.class, mac.getKey());
+                    .child(RemoteMcastMacs.class, mac.key());
             onConfigUpdate(transaction, nodeIid, mac, macKey);
         }
     }
@@ -120,7 +120,7 @@ public class McastMacsRemoteRemoveCommand extends AbstractTransactCommand<Remote
 
     @Override
     protected boolean areEqual(RemoteMcastMacs macs1, RemoteMcastMacs macs2) {
-        return macs1.getKey().equals(macs2.getKey()) && Objects.equals(macs1.getLocatorSet(), macs2.getLocatorSet());
+        return macs1.key().equals(macs2.key()) && Objects.equals(macs1.getLocatorSet(), macs2.getLocatorSet());
     }
 
     @Override
index 2a286d8202bbed0536308bf5404f8fe2eb4a799a..51f53de13390ac57f1bd1622ed6232e8543374f4 100644 (file)
@@ -73,7 +73,7 @@ public class McastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
                                   InstanceIdentifier macKey,
                                   Object... extraData) {
         InstanceIdentifier<RemoteMcastMacs> macIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                .child(RemoteMcastMacs.class, remoteMcastMac.getKey());
+                .child(RemoteMcastMacs.class, remoteMcastMac.key());
         processDependencies(MCAST_MAC_DATA_VALIDATOR, transaction, nodeIid, macIid, remoteMcastMac);
     }
 
@@ -158,7 +158,7 @@ public class McastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
 
     @Override
     protected boolean areEqual(RemoteMcastMacs macs1, RemoteMcastMacs macs2) {
-        return macs1.getKey().equals(macs2.getKey()) && Objects.equals(macs1.getLocatorSet(), macs2.getLocatorSet());
+        return macs1.key().equals(macs2.key()) && Objects.equals(macs1.getLocatorSet(), macs2.getLocatorSet());
     }
 
     static class McastMacUnMetDependencyGetter extends UnMetDependencyGetter<RemoteMcastMacs> {
index 21b3adfbaf91263084830f3f0b55eced67ec760a..5860036e89c0f28cb281ec99c40fce2d3acf66d1 100644 (file)
@@ -94,7 +94,7 @@ public class PhysicalPortRemoveCommand extends AbstractTransactCommand {
                     if (removed.getTerminationPoint() != null) {
                         for (TerminationPoint tp : removed.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 lswitchListRemoved.add(hppAugmentation);
                             }
@@ -115,7 +115,7 @@ public class PhysicalPortRemoveCommand extends AbstractTransactCommand {
                     if (updated.getTerminationPoint() != null) {
                         for (TerminationPoint tp : updated.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 portListUpdated.add(hppAugmentation);
                             }
@@ -124,7 +124,7 @@ public class PhysicalPortRemoveCommand extends AbstractTransactCommand {
                     if (before.getTerminationPoint() != null) {
                         for (TerminationPoint tp : before.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 portListBefore.add(hppAugmentation);
                             }
index 3cc5d61c8697574273d737bccea564a42eb28aa1..7a23175d18307815c3638703c1f6bd2ba5b7f311 100644 (file)
@@ -225,7 +225,7 @@ public class PhysicalPortUpdateCommand extends AbstractTransactCommand {
                     if (created.getTerminationPoint() != null) {
                         for (TerminationPoint tp : created.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 portListUpdated.add(hppAugmentation);
                             }
@@ -253,7 +253,7 @@ public class PhysicalPortUpdateCommand extends AbstractTransactCommand {
                     if (updated.getTerminationPoint() != null) {
                         for (TerminationPoint tp : updated.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 portListUpdated.add(hppAugmentation);
                             }
@@ -262,7 +262,7 @@ public class PhysicalPortUpdateCommand extends AbstractTransactCommand {
                     if (before.getTerminationPoint() != null) {
                         for (TerminationPoint tp : before.getTerminationPoint()) {
                             HwvtepPhysicalPortAugmentation hppAugmentation =
-                                    tp.getAugmentation(HwvtepPhysicalPortAugmentation.class);
+                                    tp.augmentation(HwvtepPhysicalPortAugmentation.class);
                             if (hppAugmentation != null) {
                                 portListBefore.add(hppAugmentation);
                             }
index d7fbb4a9549d946fc038d536600911d4ab78befd..f28a29fd9af6e8cb01ca34e2f47e52a2ca59719b 100644 (file)
@@ -88,7 +88,7 @@ public class PhysicalSwitchRemoveCommand extends AbstractTransactCommand {
                 Node removed = TransactUtils.getRemoved(mod);
                 if (removed != null) {
                     PhysicalSwitchAugmentation physicalSwitch =
-                            removed.getAugmentation(PhysicalSwitchAugmentation.class);
+                            removed.augmentation(PhysicalSwitchAugmentation.class);
                     if (physicalSwitch != null) {
                         result.put(key, physicalSwitch);
                     }
index 22ecb314028912103ae6011128feee8aefc7c85b..1e8f0b0c13267fb301aa1301e543635afc5b109c 100644 (file)
@@ -178,7 +178,7 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand {
         //TODO: needs more testing
         if (physicalSwitchAugmentation.getTunnels() != null) {
             for (Tunnels tunnel : physicalSwitchAugmentation.getTunnels()) {
-                Optional<Tunnels> opTunnelOpt = getOperationalState().getTunnels(iid, tunnel.getKey());
+                Optional<Tunnels> opTunnelOpt = getOperationalState().getTunnels(iid, tunnel.key());
                 Tunnel newTunnel = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), Tunnel.class);
 
                 UUID localUUID = getLocatorUUID(transaction,
@@ -306,7 +306,7 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand {
                 Node created = TransactUtils.getCreated(mod);
                 if (created != null) {
                     PhysicalSwitchAugmentation physicalSwitch =
-                            created.getAugmentation(PhysicalSwitchAugmentation.class);
+                            created.augmentation(PhysicalSwitchAugmentation.class);
                     if (physicalSwitch != null) {
                         result.put(key, physicalSwitch);
                     }
@@ -326,7 +326,7 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand {
                 Node updated = TransactUtils.getUpdated(mod);
                 if (updated != null) {
                     PhysicalSwitchAugmentation physicalSwitch =
-                            updated.getAugmentation(PhysicalSwitchAugmentation.class);
+                            updated.augmentation(PhysicalSwitchAugmentation.class);
                     if (physicalSwitch != null) {
                         result.put(key, physicalSwitch);
                     }
index aaebf21cf98a9188b04bd73eccbc47fe4587609b..d7142d01cc023d027d60106658c411ede81d7910 100644 (file)
@@ -53,7 +53,7 @@ public class UcastMacsLocalRemoveCommand extends AbstractTransactCommand<LocalUc
         for (LocalUcastMacs mac: macList) {
             LOG.debug("Removing remoteUcastMacs, mac address: {}", mac.getMacEntryKey().getValue());
             Optional<LocalUcastMacs> operationalMacOptional =
-                    getOperationalState().getLocalUcastMacs(instanceIdentifier, mac.getKey());
+                    getOperationalState().getLocalUcastMacs(instanceIdentifier, mac.key());
             UcastMacsLocal ucastMacsLocal = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     UcastMacsLocal.class, null);
             if (operationalMacOptional.isPresent() && operationalMacOptional.get().getMacEntryUuid() != null) {
index 49a3637123f35fbb003473d5f8968f63bdc0022f..52b20d5b6ffe83d207b4fb25f8b16898ba8b4ba2 100644 (file)
@@ -58,7 +58,7 @@ public class UcastMacsLocalUpdateCommand extends AbstractTransactCommand<LocalUc
         for (LocalUcastMacs localUcastMac: localUcastMacs) {
             LOG.debug("Creating localUcastMacs, mac address: {}", localUcastMac.getMacEntryKey().getValue());
             final Optional<LocalUcastMacs> operationalMacOptional =
-                    getOperationalState().getLocalUcastMacs(instanceIdentifier, localUcastMac.getKey());
+                    getOperationalState().getLocalUcastMacs(instanceIdentifier, localUcastMac.key());
             UcastMacsLocal ucastMacsLocal = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     UcastMacsLocal.class);
             setIpAddress(ucastMacsLocal, localUcastMac);
@@ -125,7 +125,7 @@ public class UcastMacsLocalUpdateCommand extends AbstractTransactCommand<LocalUc
                         getOperationalState().getDataBroker()).readOptional(LogicalDatastoreType.CONFIGURATION, iid);
                 if (configLocatorOptional.isPresent()) {
                     HwvtepPhysicalLocatorAugmentation locatorAugmentation =
-                            configLocatorOptional.get().getAugmentation(HwvtepPhysicalLocatorAugmentation.class);
+                            configLocatorOptional.get().augmentation(HwvtepPhysicalLocatorAugmentation.class);
                     locatorUuid = TransactUtils.createPhysicalLocator(transaction, locatorAugmentation);
                 } else {
                     LOG.warn("Create or update localUcastMac: No physical locator found in operational datastore!"
index 9cd313c575375558de5e95123ca38f02855cc097..f98f135434aed25ab091ab5fca33532fc9e93d39 100644 (file)
@@ -64,7 +64,7 @@ public class UcastMacsRemoteRemoveCommand extends AbstractTransactCommand<Remote
                                final InstanceIdentifier macKey,
                                final Object... extraData) {
         InstanceIdentifier<RemoteUcastMacs> macIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                .child(RemoteUcastMacs.class, remoteUcastMacs.getKey());
+                .child(RemoteUcastMacs.class, remoteUcastMacs.key());
         processDependencies(null, transaction, nodeIid, macIid, remoteUcastMacs);
     }
 
@@ -76,7 +76,7 @@ public class UcastMacsRemoteRemoveCommand extends AbstractTransactCommand<Remote
                                     final Object... extraData) {
         LOG.debug("Removing remoteUcastMacs, mac address: {}", mac.getMacEntryKey().getValue());
         InstanceIdentifier<RemoteUcastMacs> macIid = instanceIdentifier.augmentation(HwvtepGlobalAugmentation.class)
-                .child(RemoteUcastMacs.class, mac.getKey());
+                .child(RemoteUcastMacs.class, mac.key());
         HwvtepDeviceInfo.DeviceData deviceData =
                 getOperationalState().getDeviceInfo().getDeviceOperData(RemoteUcastMacs.class, macIid);
         UcastMacsRemote ucastMacsRemote = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
index 898a0034181abbdb407c552fe5d6f4c25cc09809..b8f46140ad18ac1ec22457e42e5cdeaa08255646 100644 (file)
@@ -69,7 +69,7 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
                                final InstanceIdentifier macKey,
                                final Object... extraData) {
         InstanceIdentifier<RemoteUcastMacs> macIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                .child(RemoteUcastMacs.class, remoteUcastMacs.getKey());
+                .child(RemoteUcastMacs.class, remoteUcastMacs.key());
         processDependencies(UCAST_MAC_DATA_VALIDATOR, transaction, nodeIid, macIid, remoteUcastMacs);
     }
 
index 998348eec318c0b00460c90605f013e76e8ca7aa..2249ef95f756b308cc9a3cdf3012b543c85452a5 100644 (file)
@@ -49,7 +49,7 @@ public class HwvtepGlobalRemoveCommand extends AbstractTransactionCommand {
             Optional<Node> hwvtepGlobalOptional = hwvtepGlobalFuture.get();
             if (hwvtepGlobalOptional.isPresent()) {
                 Node hwvtepNode = hwvtepGlobalOptional.get();
-                HwvtepGlobalAugmentation hgAugmentation = hwvtepNode.getAugmentation(HwvtepGlobalAugmentation.class);
+                HwvtepGlobalAugmentation hgAugmentation = hwvtepNode.augmentation(HwvtepGlobalAugmentation.class);
                 if (checkIfOnlyConnectedManager(hgAugmentation)) {
                     if (hgAugmentation != null) {
                         if (hgAugmentation.getSwitches() != null) {
index c389a37099042c8d1abe1c6176f59bca448f9f78..46fcb5d0b1a2cbc6576f6673372c075852004472 100644 (file)
@@ -94,7 +94,7 @@ public class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionCommand
         lrBuilder.setHwvtepNodeDescription(router.getDescription());
         HwvtepNodeName hwvtepName = new HwvtepNodeName(router.getName());
         lrBuilder.setHwvtepNodeName(hwvtepName);
-        lrBuilder.setKey(new LogicalRoutersKey(hwvtepName));
+        lrBuilder.withKey(new LogicalRoutersKey(hwvtepName));
 
         setSwitchBindings(router, lrBuilder);
         setStaticRoutes(router, lrBuilder);
index 5ef23b09a90e661c2c9bbaead8fe14c4dbd97645..ed6bee0395f49aec0cf809e9c29f7e2deccb5907 100644 (file)
@@ -93,7 +93,7 @@ public class HwvtepLogicalSwitchUpdateCommand extends AbstractTransactionCommand
         }
         HwvtepNodeName hwvtepName = new HwvtepNodeName(logicalSwitch.getName());
         lsBuilder.setHwvtepNodeName(hwvtepName);
-        lsBuilder.setKey(new LogicalSwitchesKey(hwvtepName));
+        lsBuilder.withKey(new LogicalSwitchesKey(hwvtepName));
         if (logicalSwitch.getTunnelKeyColumn().getData() != null
                 && !logicalSwitch.getTunnelKeyColumn().getData().isEmpty()) {
             lsBuilder.setTunnelKey(logicalSwitch.getTunnelKeyColumn().getData().iterator().next().toString());
index cdb26a72320038273d6a34654de7f307b3cbd0e2..0ca3811338f7371df7baf650bb432b785bd0a517 100644 (file)
@@ -75,7 +75,7 @@ public class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactionComma
 
     InstanceIdentifier<RemoteMcastMacs> getMacIid(InstanceIdentifier<Node> connectionIId, Node connectionNode) {
         RemoteMcastMacsKey macsKey =
-                connectionNode.getAugmentation(HwvtepGlobalAugmentation.class).getRemoteMcastMacs().get(0).getKey();
+                connectionNode.augmentation(HwvtepGlobalAugmentation.class).getRemoteMcastMacs().get(0).key();
         InstanceIdentifier<RemoteMcastMacs> key = connectionIId.augmentation(HwvtepGlobalAugmentation.class)
                 .child(RemoteMcastMacs.class, macsKey);
         return key;
index 917c78d2aa2e379f607f38b0713f5cd438505e4a..24badcd5d8e5361afb20a209328785cd55b917e3 100644 (file)
@@ -62,7 +62,7 @@ public class HwvtepPhysicalLocatorUpdateCommand extends AbstractTransactionComma
             TerminationPointKey tpKey = HwvtepSouthboundMapper.getTerminationPointKey(locator);
             if (nodeIid != null && tpKey != null) {
                 TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
-                tpBuilder.setKey(tpKey);
+                tpBuilder.withKey(tpKey);
                 tpBuilder.setTpId(tpKey.getTpId());
                 InstanceIdentifier<TerminationPoint> tpPath =
                         HwvtepSouthboundMapper.createInstanceIdentifier(nodeIid, locator);
index 8fe06bc50a56670a9f6c35b0d91ac17496affe17..47bf5db6ac0dd8ca22bdcbd0ee5c28ab626d3b4b 100644 (file)
@@ -118,7 +118,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
             if (switchIid.isPresent()) {
                 TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
                 TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
-                tpBuilder.setKey(tpKey);
+                tpBuilder.withKey(tpKey);
                 tpBuilder.setTpId(tpKey.getTpId());
                 InstanceIdentifier<TerminationPoint> tpPath = getInstanceIdentifier(switchIid.get(), portUpdate);
                 HwvtepPhysicalPortAugmentationBuilder tpAugmentationBuilder =
@@ -180,7 +180,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
                 new FutureCallback<Optional<TerminationPoint>>() {
                     @Override
                     public void onSuccess(@Nonnull Optional<TerminationPoint> optionalConfigTp) {
-                        if (!optionalConfigTp.isPresent() || optionalConfigTp.get().getAugmentation(
+                        if (!optionalConfigTp.isPresent() || optionalConfigTp.get().augmentation(
                                 HwvtepPhysicalPortAugmentation.class) == null) {
                             //TODO port came with some vlan bindings clean them up use PortRemovedCommand
                             return;
@@ -196,7 +196,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
                             PhysicalPortUpdateCommand portUpdateCommand = new PhysicalPortUpdateCommand(
                                     operState, Collections.EMPTY_LIST);
                             portUpdateCommand.updatePhysicalPort(transactionBuilder, psIid,
-                                    Lists.newArrayList(configTp.getAugmentation(HwvtepPhysicalPortAugmentation.class)));
+                                    Lists.newArrayList(configTp.augmentation(HwvtepPhysicalPortAugmentation.class)));
                         });
                     }
 
@@ -261,7 +261,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
     private VlanBindings createVlanBinding(Long key, UUID value) {
         VlanBindingsBuilder vbBuilder = new VlanBindingsBuilder();
         VlanBindingsKey vbKey = new VlanBindingsKey(new VlanId(key.intValue()));
-        vbBuilder.setKey(vbKey);
+        vbBuilder.withKey(vbKey);
         vbBuilder.setVlanIdKey(vbKey.getVlanIdKey());
         HwvtepLogicalSwitchRef switchRef = this.getLogicalSwitchRef(value);
         vbBuilder.setLogicalSwitchRef(switchRef);
@@ -293,7 +293,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
 
     private Optional<InstanceIdentifier<Node>> getTerminationPointSwitch(final ReadWriteTransaction transaction,
             Node node, String tpName) {
-        HwvtepGlobalAugmentation hwvtepNode = node.getAugmentation(HwvtepGlobalAugmentation.class);
+        HwvtepGlobalAugmentation hwvtepNode = node.augmentation(HwvtepGlobalAugmentation.class);
         List<Switches> switchNodes = hwvtepNode.getSwitches();
         for (Switches managedNodeEntry : switchNodes) {
             @SuppressWarnings("unchecked")
@@ -302,7 +302,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
             TerminationPointKey tpKey = new TerminationPointKey(new TpId(tpName));
             if (switchNode.getTerminationPoint() != null) {
                 for (TerminationPoint terminationPoint : switchNode.getTerminationPoint()) {
-                    if (terminationPoint.getKey().equals(tpKey)) {
+                    if (terminationPoint.key().equals(tpKey)) {
                         return Optional.of((InstanceIdentifier<Node>) managedNodeEntry.getSwitchRef().getValue());
                     }
                 }
@@ -317,7 +317,7 @@ public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand
                 && !portUpdate.getPortFaultStatusColumn().getData().isEmpty()) {
             List<PortFaultStatus> portFaultStatusLst = new ArrayList<>();
             for (String portFaultStatus : portUpdate.getPortFaultStatusColumn().getData()) {
-                portFaultStatusLst.add(new PortFaultStatusBuilder().setKey(new PortFaultStatusKey(portFaultStatus))
+                portFaultStatusLst.add(new PortFaultStatusBuilder().withKey(new PortFaultStatusKey(portFaultStatus))
                         .setPortFaultStatusKey(portFaultStatus).build());
             }
             tpAugmentationBuilder.setPortFaultStatus(portFaultStatusLst);
index 644757df6b49484b0d28cfcee2775f6ef2efd534..b6a156807cfcc8637bf56ab28d65aedf9292051c 100644 (file)
@@ -115,8 +115,8 @@ public class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionComman
 
     private InstanceIdentifier<TunnelIps> getTunnelIpIid(final String tunnelIp, final InstanceIdentifier<Node> psIid) {
         IpAddress ip = new IpAddress(tunnelIp.toCharArray());
-        TunnelIps tunnelIps = new TunnelIpsBuilder().setKey(new TunnelIpsKey(ip)).setTunnelIpsKey(ip).build();
-        return psIid.augmentation(PhysicalSwitchAugmentation.class).child(TunnelIps.class, tunnelIps.getKey());
+        TunnelIps tunnelIps = new TunnelIpsBuilder().withKey(new TunnelIpsKey(ip)).setTunnelIpsKey(ip).build();
+        return psIid.augmentation(PhysicalSwitchAugmentation.class).child(TunnelIps.class, tunnelIps.key());
     }
 
     private void updateTunnelIps(@Nonnull final PhysicalSwitch newPSwitch, @Nullable final PhysicalSwitch oldPSwitch,
@@ -137,7 +137,7 @@ public class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionComman
         for (String tunnelIp : addedTunnelIps) {
             IpAddress ip = new IpAddress(tunnelIp.toCharArray());
             InstanceIdentifier<TunnelIps> tunnelIpsInstanceIdentifier = getTunnelIpIid(tunnelIp, psIid);
-            TunnelIps tunnelIps = new TunnelIpsBuilder().setKey(new TunnelIpsKey(ip)).setTunnelIpsKey(ip).build();
+            TunnelIps tunnelIps = new TunnelIpsBuilder().withKey(new TunnelIpsKey(ip)).setTunnelIpsKey(ip).build();
             transaction.put(LogicalDatastoreType.OPERATIONAL, tunnelIpsInstanceIdentifier, tunnelIps, true);
         }
     }
@@ -192,7 +192,7 @@ public class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionComman
             for (String mgmtIp : phySwitch.getManagementIpsColumn().getData()) {
                 IpAddress ip = new IpAddress(mgmtIp.toCharArray());
                 mgmtIps.add(
-                        new ManagementIpsBuilder().setKey(new ManagementIpsKey(ip)).setManagementIpsKey(ip).build());
+                        new ManagementIpsBuilder().withKey(new ManagementIpsKey(ip)).setManagementIpsKey(ip).build());
             }
             psAugmentationBuilder.setManagementIps(mgmtIps);
         }
@@ -259,7 +259,7 @@ public class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionComman
             List<SwitchFaultStatus> switchFaultStatusLst = new ArrayList<>();
             for (String switchFaultStatus : phySwitch.getSwitchFaultStatusColumn().getData()) {
                 switchFaultStatusLst
-                        .add(new SwitchFaultStatusBuilder().setKey(new SwitchFaultStatusKey(switchFaultStatus))
+                        .add(new SwitchFaultStatusBuilder().withKey(new SwitchFaultStatusKey(switchFaultStatus))
                                 .setSwitchFaultStatusKey(switchFaultStatus).build());
             }
             psAugmentationBuilder.setSwitchFaultStatus(switchFaultStatusLst);
index 7b0cbb854bb6122566b579095ca12009d9ad68d8..3a0752a78ede56ed82c71568e87b150496995e3c 100644 (file)
@@ -115,6 +115,6 @@ public class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionComma
 
     private InstanceIdentifier<RemoteUcastMacs> getMacIid(final RemoteUcastMacs remoteUcastMacs) {
         return getOvsdbConnectionInstance().getInstanceIdentifier()
-                .augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, remoteUcastMacs.getKey());
+                .augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, remoteUcastMacs.key());
     }
 }
index cfc6b0627b7c5f0f6fb13273e5511d2ddb1fa582..800a065de85b514130022705032544d7739c0c02 100644 (file)
@@ -289,7 +289,7 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest {
 
             for (LogicalSwitches ls : logicalSwitches) {
                 InstanceIdentifier<LogicalSwitches> key =
-                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, ls.getKey());
+                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, ls.key());
                 tx.delete(logicalDatastoreType, key);
             }
         }
@@ -300,7 +300,7 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest {
             List<RemoteUcastMacs> macs = TestBuilders.addRemoteUcastMacs(nodeIid, builder, data);
             for (RemoteUcastMacs mac : macs) {
                 InstanceIdentifier<RemoteUcastMacs> key =
-                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, mac.getKey());
+                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, mac.key());
                 tx.delete(logicalDatastoreType, key);
             }
         }
@@ -308,7 +308,7 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest {
             List<RemoteMcastMacs> macs = TestBuilders.addRemoteMcastMacs(nodeIid, builder, data);
             for (RemoteMcastMacs mac : macs) {
                 InstanceIdentifier<RemoteMcastMacs> key =
-                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class, mac.getKey());
+                        nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class, mac.key());
                 tx.delete(logicalDatastoreType, key);
             }
         }
index ad512ae6f5d9052ef1c79b56dd498813f1a81d97..914980586e2682d44169c438b28d733d08e4f8bd 100644 (file)
@@ -65,7 +65,7 @@ public class DependencyQueueTest extends DataChangeListenerTestBase {
         lsIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
                 .child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName("ls0")));
         macIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class)
-                .child(RemoteMcastMacs.class, new RemoteMcastMacsKey(mac.getKey()));
+                .child(RemoteMcastMacs.class, new RemoteMcastMacsKey(mac.key()));
         setFinalStatic(DependencyQueue.class, "EXECUTOR_SERVICE", PowerMockito.mock(SameThreadScheduledExecutor.class,
                 Mockito.CALLS_REAL_METHODS));
     }
index 6574274f78d953eece4c535f4d844b7e98bcf917..cbfa8bcefffdcd311ae46b046a7ae8d222f021c6 100644 (file)
@@ -116,19 +116,19 @@ public class HwvtepOperationalDataChangeListener implements ClusteredDataTreeCha
         if (LogicalSwitches.class == childClass) {
             LogicalSwitches ls = (LogicalSwitches)data;
             instanceIdentifier = key.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class,
-                    ls.getKey());
+                    ls.key());
         } else if (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology
                 .topology.node.TerminationPoint.class == childClass) {
             TerminationPoint tp = (TerminationPoint)data;
-            instanceIdentifier = key.child(TerminationPoint.class, tp.getKey());
+            instanceIdentifier = key.child(TerminationPoint.class, tp.key());
         } else if (RemoteUcastMacs.class == childClass) {
             RemoteUcastMacs mac = (RemoteUcastMacs)data;
             instanceIdentifier = key.augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class,
-                    mac.getKey());
+                    mac.key());
         } else if (RemoteMcastMacs.class ==  childClass) {
             RemoteMcastMacs mac = (RemoteMcastMacs)data;
             instanceIdentifier = key.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class,
-                    mac.getKey());
+                    mac.key());
         }
         return instanceIdentifier;
     }
index 8002de1a522099498c42a41a2305c276bd1dbf73..fab3290ddc21f3bd553dd6424aede21c0071c937 100644 (file)
@@ -109,7 +109,7 @@ public final class TestBuilders {
         TerminationPointKey tpKey = new TerminationPointKey(new TpId("vxlan_over_ipv4:" + ip));
         TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
         if (nodeIid != null) {
-            tpBuilder.setKey(tpKey);
+            tpBuilder.withKey(tpKey);
             tpBuilder.setTpId(tpKey.getTpId());
             HwvtepPhysicalLocatorAugmentationBuilder tpAugmentationBuilder =
                     new HwvtepPhysicalLocatorAugmentationBuilder();
@@ -125,7 +125,7 @@ public final class TestBuilders {
         String logicalSwitch = keys[0];
         String tunnelKey = keys[1];
         LogicalSwitchesBuilder logicalSwitchesBuilder = new LogicalSwitchesBuilder();
-        logicalSwitchesBuilder.setKey(new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch)));
+        logicalSwitchesBuilder.withKey(new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch)));
         logicalSwitchesBuilder.setHwvtepNodeName(new HwvtepNodeName(logicalSwitch));
         logicalSwitchesBuilder.setTunnelKey(tunnelKey);
         Uuid uuid = getUUid(logicalSwitch);
index 31e01863fe1e0c6fd3e7e9c8bcc10e46bd5505a1..32282999ab9109c681eada74d7a84450a92437da 100644 (file)
@@ -519,7 +519,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
                     LogicalDatastoreType dataStore) {
         Node psNode = getPhysicalSwitchNode(connectionInfo, psName, dataStore);
         Assert.assertNotNull(psNode);
-        PhysicalSwitchAugmentation psAugmentation = psNode.getAugmentation(PhysicalSwitchAugmentation.class);
+        PhysicalSwitchAugmentation psAugmentation = psNode.augmentation(PhysicalSwitchAugmentation.class);
         Assert.assertNotNull(psAugmentation);
         return psAugmentation;
     }
index bc27a7eed3b10c7ac892d4c16ece29f6fbff345f..ac2fee0212a531084d225a0b4a35be06825de5b6 100644 (file)
@@ -293,8 +293,8 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
 
     public OvsdbConnectionInstance getConnectionInstance(Node node) {
         Preconditions.checkNotNull(node);
-        OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
-        OvsdbBridgeAugmentation ovsdbManagedNode = node.getAugmentation(OvsdbBridgeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNode = node.augmentation(OvsdbNodeAugmentation.class);
+        OvsdbBridgeAugmentation ovsdbManagedNode = node.augmentation(OvsdbBridgeAugmentation.class);
         if (ovsdbNode != null) {
             return getConnectionInstance(ovsdbNode.getConnectionInfo());
         } else if (ovsdbManagedNode != null) {
@@ -446,7 +446,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
             Optional<Node> ovsdbNodeOpt = SouthboundUtil.readNode(transaction, nodeIid);
             if (ovsdbNodeOpt.isPresent()) {
                 Node ovsdbNode = ovsdbNodeOpt.get();
-                OvsdbNodeAugmentation nodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+                OvsdbNodeAugmentation nodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
                 if (nodeAugmentation != null) {
                     if (nodeAugmentation.getManagedNodeEntry() != null) {
                         for (ManagedNodeEntry managedNode : nodeAugmentation.getManagedNodeEntry()) {
index 33a203b5392a403476fbed6da4d9128db1aa7c06..03e35676e0c7c851c29c72756bde4c9248fc3272 100644 (file)
@@ -225,9 +225,9 @@ public class OvsdbDataTreeChangeListener implements ClusteredDataTreeChangeListe
                     ? change.getRootNode().getDataAfter() : change.getRootNode().getDataBefore();
             if (node != null) {
                 InstanceIdentifier<Node> nodeIid;
-                Augmentation nodeAug = node.getAugmentation(OvsdbNodeAugmentation.class) != null
-                        ? node.getAugmentation(OvsdbNodeAugmentation.class)
-                        : node.getAugmentation(OvsdbBridgeAugmentation.class);
+                Augmentation nodeAug = node.augmentation(OvsdbNodeAugmentation.class) != null
+                        ? node.augmentation(OvsdbNodeAugmentation.class)
+                        : node.augmentation(OvsdbBridgeAugmentation.class);
 
                 if (nodeAug instanceof OvsdbNodeAugmentation) {
                     OvsdbNodeAugmentation ovsdbNode = (OvsdbNodeAugmentation) nodeAug;
index 4c56e6f408689881855af874aeff6eb41008559b..7b0f86b0e39134b4874be83d61effcc76d2c5541 100644 (file)
@@ -300,7 +300,7 @@ public final class SouthboundMapper {
                 bridgeNode, updatedControllerRows);
         final List<ControllerEntry> controllerEntriesCreated = new ArrayList<>();
         final OvsdbBridgeAugmentation ovsdbBridgeAugmentation =
-                bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+                bridgeNode.augmentation(OvsdbBridgeAugmentation.class);
         if (ovsdbBridgeAugmentation == null) {
             return controllerEntriesCreated;
         }
@@ -421,7 +421,7 @@ public final class SouthboundMapper {
                 ovsdbNode, updatedManagerRows);
         final List<ManagerEntry> managerEntriesCreated = new ArrayList<>();
         final OvsdbNodeAugmentation ovsdbNodeAugmentation =
-                ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+                ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         if (ovsdbNodeAugmentation == null) {
             return managerEntriesCreated;
         }
@@ -534,7 +534,7 @@ public final class SouthboundMapper {
         if (terminationPoints != null && !terminationPoints.isEmpty()) {
             for (TerminationPoint tp : terminationPoints) {
                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                        tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                        tp.augmentation(OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation != null) {
                     final InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid =
                             bridgeNodeIid
index b3f659decf43289ce159ee69f656fc1e37aa6655..0516728546336302a5f11065c41d08460f832dbd 100644 (file)
@@ -61,7 +61,7 @@ public final class SouthboundUtil {
                     if (node instanceof OvsdbNodeAugmentation) {
                         ovsdbNode = (OvsdbNodeAugmentation) node;
                     } else if (node != null) {
-                        ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
+                        ovsdbNode = node.augmentation(OvsdbNodeAugmentation.class);
                     }
                     if (ovsdbNode != null) {
                         return Optional.of(ovsdbNode);
@@ -123,7 +123,7 @@ public final class SouthboundUtil {
     public static String getControllerTarget(Node ovsdbNode) {
         String target = null;
         String ipAddr = null;
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         ConnectionInfo connectionInfo = ovsdbNodeAugmentation.getConnectionInfo();
         LOG.info("connectionInfo: {}", connectionInfo);
         if (connectionInfo != null && connectionInfo.getLocalIp() != null) {
index 18d36e857e1a3afca441f258596916ee58db6e6d..0f382fa33ca728ed90d81d2e53769651536fa1f3 100644 (file)
@@ -81,7 +81,7 @@ public class AutoAttachRemovedCommand implements TransactCommand {
                         return;
                     }
                     final OvsdbNodeAugmentation currentOvsdbNode =
-                            state.getBridgeNode(ovsdbNodeIid).get().getAugmentation(OvsdbNodeAugmentation.class);
+                            state.getBridgeNode(ovsdbNodeIid).get().augmentation(OvsdbNodeAugmentation.class);
                     final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach();
                     for (final Autoattach origAutoattach : origAutoattachList) {
                         final Uri autoAttachId = origAutoattach.getAutoattachId();
@@ -146,7 +146,7 @@ public class AutoAttachRemovedCommand implements TransactCommand {
             final Optional<Node> nodeOptional = transaction.read(LogicalDatastoreType.OPERATIONAL, nodeIid).get();
             if (nodeOptional.isPresent()) {
                 final List<ManagedNodeEntry> managedNodes =
-                        nodeOptional.get().getAugmentation(OvsdbNodeAugmentation.class).getManagedNodeEntry();
+                        nodeOptional.get().augmentation(OvsdbNodeAugmentation.class).getManagedNodeEntry();
                 for (final ManagedNodeEntry managedNode : managedNodes) {
                     final OvsdbBridgeRef ovsdbBridgeRef = managedNode.getBridgeRef();
                     final InstanceIdentifier<OvsdbBridgeAugmentation> brIid = ovsdbBridgeRef.getValue()
index f1e5e7a0b39dc62e04ca97ec4b737fe3f32da5ef..06ec6bdb2952d095be8dd4a2d1fbe0dfc3085883 100644 (file)
@@ -91,7 +91,7 @@ public class AutoAttachUpdateCommand implements TransactCommand {
             }
 
             final OvsdbNodeAugmentation currentOvsdbNode =
-                    state.getBridgeNode(iid).get().getAugmentation(OvsdbNodeAugmentation.class);
+                    state.getBridgeNode(iid).get().augmentation(OvsdbNodeAugmentation.class);
             final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach();
             for (final Autoattach autoAttach : autoAttachList) {
                 final AutoAttach autoAttachWrapper =
index c4b45da56d7389936db334cdf50aef9146b56106..271740cd2750dcb6f00c7e33d7eb61b48bc2d260 100644 (file)
@@ -82,7 +82,7 @@ public class BridgeOperationalState {
     public Optional<OvsdbBridgeAugmentation> getOvsdbBridgeAugmentation(InstanceIdentifier<?> iid) {
         Optional<Node> nodeOptional = getBridgeNode(iid);
         if (nodeOptional.isPresent()) {
-            return Optional.fromNullable(nodeOptional.get().getAugmentation(OvsdbBridgeAugmentation.class));
+            return Optional.fromNullable(nodeOptional.get().augmentation(OvsdbBridgeAugmentation.class));
         }
         return Optional.absent();
     }
@@ -94,7 +94,7 @@ public class BridgeOperationalState {
                 TerminationPointKey key = iid.firstKeyOf(TerminationPoint.class);
                 if (key != null) {
                     for (TerminationPoint tp:nodeOptional.get().getTerminationPoint()) {
-                        if (tp.getKey().equals(key)) {
+                        if (tp.key().equals(key)) {
                             return Optional.of(tp);
                         }
                     }
@@ -109,7 +109,7 @@ public class BridgeOperationalState {
     public Optional<OvsdbTerminationPointAugmentation> getOvsdbTerminationPointAugmentation(InstanceIdentifier<?> iid) {
         Optional<TerminationPoint> tpOptional = getBridgeTerminationPoint(iid);
         if (tpOptional.isPresent()) {
-            return Optional.fromNullable(tpOptional.get().getAugmentation(OvsdbTerminationPointAugmentation.class));
+            return Optional.fromNullable(tpOptional.get().augmentation(OvsdbTerminationPointAugmentation.class));
         }
         return Optional.absent();
     }
@@ -121,7 +121,7 @@ public class BridgeOperationalState {
                 ControllerEntryKey key = iid.firstKeyOf(ControllerEntry.class);
                 if (key != null) {
                     for (ControllerEntry entry: ovsdbBridgeOptional.get().getControllerEntry()) {
-                        if (entry.getKey().equals(key)) {
+                        if (entry.key().equals(key)) {
                             return Optional.of(entry);
                         }
                     }
@@ -138,7 +138,7 @@ public class BridgeOperationalState {
                 ProtocolEntryKey key = iid.firstKeyOf(ProtocolEntry.class);
                 if (key != null) {
                     for (ProtocolEntry entry: ovsdbBridgeOptional.get().getProtocolEntry()) {
-                        if (entry.getKey().equals(key)) {
+                        if (entry.key().equals(key)) {
                             return Optional.of(entry);
                         }
                     }
index 8cdf33a7b9928125bc2cae0defd77b6b2853a3e2..c1e58f7110470455a2ff8bc6493e70c425868ef3 100644 (file)
@@ -123,7 +123,7 @@ public class DataChangesManagedByOvsdbNodeEvent implements DataChangeEvent {
         Optional<?> bridgeNode =  SouthboundUtil.readNode(db.newReadWriteTransaction(),nodeEntryIid);
         if (bridgeNode.isPresent() && bridgeNode.get() instanceof Node) {
             Node node = (Node)bridgeNode.get();
-            OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class);
+            OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class);
             if (bridge != null && bridge.getManagedBy() != null) {
                 return bridge.getManagedBy().getValue();
             }
@@ -144,7 +144,7 @@ public class DataChangesManagedByOvsdbNodeEvent implements DataChangeEvent {
         // If we are contained in a bridge managed by this iid
         if (dataObject != null && dataObject instanceof Node) {
             Node node = (Node)dataObject;
-            OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class);
+            OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class);
             if (bridge != null && bridge.getManagedBy() != null && bridge.getManagedBy().getValue().equals(this.iid)) {
                 return bridge.getManagedBy().getValue();
             }
index caa4aa910dfd63eec0b6012ee77d19e9ada7d2ad..63d38df496e5f586dbadf714aaa8c30b7d8f8228 100644 (file)
@@ -62,7 +62,7 @@ public class QosRemovedCommand implements TransactCommand {
                 if (origQosEntries != null && !origQosEntries.isEmpty()) {
                     for (QosEntries origQosEntry : origQosEntries) {
                         OvsdbNodeAugmentation operNode =
-                                state.getBridgeNode(ovsdbNodeIid).get().getAugmentation(OvsdbNodeAugmentation.class);
+                                state.getBridgeNode(ovsdbNodeIid).get().augmentation(OvsdbNodeAugmentation.class);
                         List<QosEntries> operQosEntries = operNode.getQosEntries();
 
                         boolean found = false;
index d9273bc8bb00581ae421a53c0131ba7e4f6c6863..210429c11e845e94835454fc4f7005bcb1ae6724 100644 (file)
@@ -67,7 +67,7 @@ public class QosUpdateCommand implements TransactCommand {
                 return;
             }
             OvsdbNodeAugmentation operNode =
-                state.getBridgeNode(iid).get().getAugmentation(OvsdbNodeAugmentation.class);
+                state.getBridgeNode(iid).get().augmentation(OvsdbNodeAugmentation.class);
 
             QosEntries qosEntry = qosMapEntry.getValue();
             Qos qos = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), Qos.class);
index ee6c76b699d39a993aeafb8b496cd90fb034b7b0..002197896a1b12bf78310e282d482f5920519099 100644 (file)
@@ -60,7 +60,7 @@ public class QueueRemovedCommand implements TransactCommand {
                 if (origQueues != null && !origQueues.isEmpty()) {
                     for (Queues origQueue : origQueues) {
                         OvsdbNodeAugmentation operNode =
-                                state.getBridgeNode(ovsdbNodeIid).get().getAugmentation(
+                                state.getBridgeNode(ovsdbNodeIid).get().augmentation(
                                         OvsdbNodeAugmentation.class);
                         List<Queues> operQueues = operNode.getQueues();
 
index d7bed607e254a64b639524d7ab31d3bf29a2a296..927c45b4508acac505a274c93696e6caaab9a6a0 100644 (file)
@@ -100,7 +100,7 @@ public class QueueUpdateCommand implements TransactCommand {
             }
 
             OvsdbNodeAugmentation operNode =
-                state.getBridgeNode(iid).get().getAugmentation(OvsdbNodeAugmentation.class);
+                state.getBridgeNode(iid).get().augmentation(OvsdbNodeAugmentation.class);
             Uuid operQueueUuid = getQueueEntryUuid(operNode.getQueues(), queueEntry.getQueueId());
             if (operQueueUuid == null) {
                 UUID namedUuid = new UUID(SouthboundConstants.QUEUE_NAMED_UUID_PREFIX
index 6f2aafd90f7866f58084ed1dd6868f89aa9f883f..de0758134941d5c12794189b70278f24cf75fabf 100644 (file)
@@ -341,7 +341,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
         InstanceIdentifier<Node> nodeIid = key.firstIdentifierOf(Node.class);
         if (nodes != null && nodes.get(nodeIid) != null) {
             Node node = nodes.get(nodeIid);
-            bridge = node.getAugmentation(OvsdbBridgeAugmentation.class);
+            bridge = node.augmentation(OvsdbBridgeAugmentation.class);
             if (bridge == null) {
                 ReadOnlyTransaction transaction = SouthboundProvider.getDb().newReadOnlyTransaction();
                 CheckedFuture<Optional<Node>, ReadFailedException> future =
@@ -349,7 +349,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
                 try {
                     Optional<Node> nodeOptional = future.get();
                     if (nodeOptional.isPresent()) {
-                        bridge = nodeOptional.get().getAugmentation(OvsdbBridgeAugmentation.class);
+                        bridge = nodeOptional.get().augmentation(OvsdbBridgeAugmentation.class);
                     }
                 } catch (InterruptedException | ExecutionException e) {
                     LOG.warn("Error reading from datastore",e);
index e0878abdf62db33abe9dbd98d7a0f998a0441506..658920174999911f5e32d813c3ed7677a20c7270 100644 (file)
@@ -66,7 +66,7 @@ public class TerminationPointDeleteCommand implements TransactCommand {
             OvsdbTerminationPointAugmentation original = originals.get(removedTpIid);
             Node originalNode = originalNodes.get(removedTpIid.firstIdentifierOf(Node.class));
             OvsdbBridgeAugmentation originalOvsdbBridgeAugmentation =
-                    originalNode.getAugmentation(OvsdbBridgeAugmentation.class);
+                    originalNode.augmentation(OvsdbBridgeAugmentation.class);
             String bridgeName = null;
             if (originalOvsdbBridgeAugmentation != null) {
                 bridgeName = originalOvsdbBridgeAugmentation.getBridgeName().getValue();
index 84ebe962229bc1ae041c8f6f6ce72cfc7d4771d4..f06b982a0ca85b05e3fcff9deeabc350c708396d 100644 (file)
@@ -198,7 +198,7 @@ public class TerminationPointUpdateCommand implements TransactCommand {
         try {
             Optional<Node> nodeOptional = future.get();
             if (nodeOptional.isPresent()) {
-                operNode = nodeOptional.get().getAugmentation(OvsdbNodeAugmentation.class);
+                operNode = nodeOptional.get().augmentation(OvsdbNodeAugmentation.class);
             }
         } catch (InterruptedException | ExecutionException e) {
             LOG.warn("Error reading from datastore", e);
index 95afbd6ca8df0e2929080e2bffc23a466e0f6175..5c578c9dfc7294a33a0d6b522ef6747dae9af60b 100644 (file)
@@ -151,7 +151,7 @@ public class ReconciliationManager implements AutoCloseable {
         Preconditions.checkNotNull(bridgeNodes, "Bridge Node list must not be null");
         if (!bridgeNodes.isEmpty()) {
             for (Node node : bridgeNodes) {
-                bridgeNodeCache.put(node.getKey(),
+                bridgeNodeCache.put(node.key(),
                         new NodeConnectionMetadata(node, connectionManager, connectionInstance));
             }
             registerBridgeCreatedDataTreeChangeListener();
index e0c91574536ab69249983a12d0f2ce5d7afb626e..73b124fe9836b6b95e8c46363b40a2360cecc95e 100644 (file)
@@ -88,12 +88,12 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask {
                         final List<Node> tpChanges = new ArrayList<>();
                         for (Node node : topology.getNode()) {
                             LOG.debug("Reconcile Configuration for node {}", node.getNodeId());
-                            OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class);
+                            OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class);
                             if (bridge != null && bridge.getManagedBy() != null
                                     && bridge.getManagedBy().getValue().equals(ndIid)) {
                                 brChanges.putAll(extractBridgeConfigurationChanges(node, bridge));
                                 tpChanges.add(node);
-                            } else if (node.getKey().getNodeId().getValue().startsWith(
+                            } else if (node.key().getNodeId().getValue().startsWith(
                                     nodeIid.firstKeyOf(Node.class).getNodeId().getValue())
                                     && node.getTerminationPoint() != null && !node.getTerminationPoint().isEmpty()) {
                                 tpChanges.add(node);
@@ -134,7 +134,7 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask {
             for (ProtocolEntry protocol : ovsdbBridge.getProtocolEntry()) {
                 if (SouthboundConstants.OVSDB_PROTOCOL_MAP.get(protocol.getProtocol()) != null) {
                     KeyedInstanceIdentifier<ProtocolEntry, ProtocolEntryKey> protocolIid =
-                            ovsdbBridgeIid.child(ProtocolEntry.class, protocol.getKey());
+                            ovsdbBridgeIid.child(ProtocolEntry.class, protocol.key());
                     changes.put(protocolIid, protocol);
                 } else {
                     throw new IllegalArgumentException("Unknown protocol " + protocol.getProtocol());
@@ -145,7 +145,7 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask {
         if (ovsdbBridge.getControllerEntry() != null) {
             for (ControllerEntry controller : ovsdbBridge.getControllerEntry()) {
                 KeyedInstanceIdentifier<ControllerEntry, ControllerEntryKey> controllerIid =
-                        ovsdbBridgeIid.child(ControllerEntry.class, controller.getKey());
+                        ovsdbBridgeIid.child(ControllerEntry.class, controller.key());
                 changes.put(controllerIid, controller);
             }
         }
index 108d88fa81cb77347b9114036e3ff5e2ac891a8f..ee0a32b7ea91b645ba3fc02fd32abcb9d3b61c17 100644 (file)
@@ -71,14 +71,14 @@ public class OvsdbAutoAttachRemovedCommand extends AbstractTransactionCommand {
     }
 
     private AutoattachKey getAutoAttachKeyToRemove(Node node, UUID autoAttachUuid) {
-        final List<Autoattach> autoAttachList = node.getAugmentation(OvsdbNodeAugmentation.class).getAutoattach();
+        final List<Autoattach> autoAttachList = node.augmentation(OvsdbNodeAugmentation.class).getAutoattach();
         if (autoAttachList == null || autoAttachList.isEmpty()) {
             return null;
         }
         for (final Autoattach autoAttach : autoAttachList) {
             if (autoAttach.getAutoattachUuid()
                     .equals(new Uuid(autoAttachUuid.toString()))) {
-                return autoAttach.getKey();
+                return autoAttach.key();
             }
         }
         return null;
index 5ab23ff8af89a03f6b67192e5509b9636a93d097..30882ca688e10e2ab9efd4efb8a459d601a7fcdb 100644 (file)
@@ -102,7 +102,7 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand {
                                 : new AutoattachBuilder()
                                 .setAutoattachUuid(new Uuid(entry.getKey().toString()))
                                 .setAutoattachId(uri)
-                                .setKey(new AutoattachKey(uri));
+                                .withKey(new AutoattachKey(uri));
 
                 if (autoAttach.getSystemNameColumn() != null
                         && autoAttach.getSystemNameColumn().getData() != null
@@ -127,7 +127,7 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand {
                         ovsdbNode.get().getNodeId(), autoAttachEntry);
                 final InstanceIdentifier<Autoattach> iid = nodeIId
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(Autoattach.class, autoAttachEntry.getKey());
+                        .child(Autoattach.class, autoAttachEntry.key());
                 transaction.put(LogicalDatastoreType.OPERATIONAL,
                         iid, autoAttachEntry);
             }
@@ -143,7 +143,7 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand {
             final Integer mappingsValue = Integer.valueOf(entry.getValue().intValue());
             if (mappingsKey != null) {
                 mappingsList.add(new MappingsBuilder()
-                        .setKey(new MappingsKey(mappingsKey))
+                        .withKey(new MappingsKey(mappingsKey))
                         .setMappingsKey(mappingsKey)
                         .setMappingsValue(mappingsValue)
                         .build());
index 50e6a147a89815126a10fa86d8b4f4ccdb68ddf0..37e9575136977b49b25d2e118b0faa57e416ef9d 100644 (file)
@@ -121,7 +121,7 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand {
                 final InstanceIdentifier<Node> bridgeIid = bridgeNodeEntry.getKey();
                 InstanceIdentifier<ControllerEntry> iid = bridgeIid
                         .augmentation(OvsdbBridgeAugmentation.class)
-                        .child(ControllerEntry.class, controllerEntry.getKey());
+                        .child(ControllerEntry.class, controllerEntry.key());
                 transaction.merge(LogicalDatastoreType.OPERATIONAL,
                         iid, controllerEntry);
             }
@@ -139,7 +139,7 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand {
         final InstanceIdentifier<Node> connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier();
         final Optional<Node> ovsdbNode = SouthboundUtil.readNode(transaction, connectionIId);
         if (ovsdbNode.isPresent()) {
-            OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.get().getAugmentation(OvsdbNodeAugmentation.class);
+            OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.get().augmentation(OvsdbNodeAugmentation.class);
             if (ovsdbNodeAugmentation != null) {
                 final List<ManagedNodeEntry> managedNodeEntries = ovsdbNodeAugmentation.getManagedNodeEntry();
                 for (ManagedNodeEntry managedNodeEntry : managedNodeEntries) {
@@ -185,6 +185,6 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand {
 
         return bridgeIid
                 .augmentation(OvsdbBridgeAugmentation.class)
-                .child(ControllerEntry.class, controllerEntry.getKey());
+                .child(ControllerEntry.class, controllerEntry.key());
     }
 }
index 5e5f65ea007cb960f1291491e57130ffc04eb267..2b1bffa19806c3dbad872ab8e5575dd23273a42a 100644 (file)
@@ -122,7 +122,7 @@ public class OvsdbManagersUpdateCommand extends AbstractTransactionCommand {
             for (ManagerEntry managerEntry : managerEntries) {
                 InstanceIdentifier<ManagerEntry> iid = connectionIId
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(ManagerEntry.class, managerEntry.getKey());
+                        .child(ManagerEntry.class, managerEntry.key());
                 transaction.merge(LogicalDatastoreType.OPERATIONAL,
                         iid, managerEntry);
             }
@@ -148,7 +148,7 @@ public class OvsdbManagersUpdateCommand extends AbstractTransactionCommand {
 
         return ovsdbNodeIid
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(ManagerEntry.class, managerEntry.getKey());
+                .child(ManagerEntry.class, managerEntry.key());
     }
 
     private Map<Uri, Manager> getUriManagerMap(Map<UUID,Manager> uuidManagerMap) {
index a5187f25a72afb66d339bc7079b2acdb439d813c..8234871a47775a7e7fb900a90f2b4c64b811ba32 100644 (file)
@@ -42,7 +42,7 @@ public class OvsdbNodeRemoveCommand extends AbstractTransactionCommand {
             ovsdbNodeOptional = ovsdbNodeFuture.get();
             if (ovsdbNodeOptional.isPresent()) {
                 Node ovsdbNode = ovsdbNodeOptional.get();
-                OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+                OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
                 if (checkIfOnlyConnectedManager(ovsdbNodeAugmentation)) {
                     if (ovsdbNodeAugmentation != null) {
                         if (ovsdbNodeAugmentation.getManagedNodeEntry() != null) {
index bc9be694577a54f8e7ac306910b1e507f9e2d483..a3beb545590b7f919d2fea3dc1a9dda4e1c6a850 100644 (file)
@@ -135,7 +135,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
             if (bridgeIid.isPresent()) {
                 TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
                 TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
-                tpBuilder.setKey(tpKey);
+                tpBuilder.withKey(tpKey);
                 tpBuilder.setTpId(tpKey.getTpId());
                 InstanceIdentifier<TerminationPoint> tpPath =
                         getInstanceIdentifier(bridgeIid.get(), portUpdate.getValue());
@@ -165,7 +165,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
             if (bridgeIid.isPresent()) {
                 TerminationPointKey tpKey = new TerminationPointKey(new TpId(interfaceName));
                 TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
-                tpBuilder.setKey(tpKey);
+                tpBuilder.withKey(tpKey);
                 tpBuilder.setTpId(tpKey.getTpId());
                 OvsdbTerminationPointAugmentationBuilder tpAugmentationBuilder =
                         new OvsdbTerminationPointAugmentationBuilder();
@@ -234,7 +234,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
     @SuppressWarnings("unchecked")
     private Optional<InstanceIdentifier<Node>> getTerminationPointBridge(
             final ReadWriteTransaction transaction, Node node, String tpName) {
-        OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNode = node.augmentation(OvsdbNodeAugmentation.class);
         List<ManagedNodeEntry> managedNodes = ovsdbNode.getManagedNodeEntry();
         TpId tpId = new TpId(tpName);
         for (ManagedNodeEntry managedNodeEntry : managedNodes) {
@@ -356,7 +356,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
             UUID qosUuid = qosUuidCol.iterator().next();
 
             NodeId nodeId = node.getNodeId();
-            OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
+            OvsdbNodeAugmentation ovsdbNode = node.augmentation(OvsdbNodeAugmentation.class);
 
             // Delete an older QoS entry
             if (portOldRows.containsKey(port.getKey()) && portOldRows.get(port.getKey()).getQosColumn() != null) {
@@ -381,7 +381,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                 List<QosEntry> qosList = new ArrayList<>();
                 OvsdbQosRef qosRef = new OvsdbQosRef(qosIid);
                 qosList.add(new QosEntryBuilder()
-                    .setKey(new QosEntryKey(Long.valueOf(SouthboundConstants.PORT_QOS_LIST_KEY)))
+                    .withKey(new QosEntryKey(Long.valueOf(SouthboundConstants.PORT_QOS_LIST_KEY)))
                     .setQosRef(qosRef).build());
                 ovsdbTerminationPointBuilder.setQosEntry(qosList);
             }
@@ -570,7 +570,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                 if (optionsKeyString != null && optionsValueString != null) {
                     OptionsKey optionsKey = new OptionsKey(optionsKeyString);
                     options.add(new OptionsBuilder()
-                        .setKey(optionsKey)
+                        .withKey(optionsKey)
                         .setValue(optionsValueString).build());
                 }
             }
@@ -609,7 +609,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                     String interfaceLldpValueString = entry.getValue();
                     if (interfaceLldpKeyString != null && interfaceLldpValueString != null) {
                         interfaceLldpList.add(new InterfaceLldpBuilder()
-                                .setKey(new InterfaceLldpKey(interfaceLldpKeyString))
+                                .withKey(new InterfaceLldpKey(interfaceLldpKeyString))
                                 .setLldpKey(interfaceLldpKeyString)
                                 .setLldpValue(interfaceLldpValueString)
                                 .build());
@@ -653,7 +653,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                     String interfaceBfdStatusValueString = entry.getValue();
                     if (interfaceBfdStatusKeyString != null && interfaceBfdStatusValueString != null) {
                         interfaceBfdStatusList.add(new InterfaceBfdStatusBuilder()
-                                .setKey(new InterfaceBfdStatusKey(interfaceBfdStatusKeyString))
+                                .withKey(new InterfaceBfdStatusKey(interfaceBfdStatusKeyString))
                                 .setBfdStatusKey(interfaceBfdStatusKeyString)
                                 .setBfdStatusValue(interfaceBfdStatusValueString)
                                 .build());
@@ -678,7 +678,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                     String interfaceBfdValueString = entry.getValue();
                     if (interfaceBfdKeyString != null && interfaceBfdValueString != null) {
                         interfaceBfdList.add(new InterfaceBfdBuilder()
-                                .setKey(new InterfaceBfdKey(interfaceBfdKeyString))
+                                .withKey(new InterfaceBfdKey(interfaceBfdKeyString))
                                 .setBfdKey(interfaceBfdKeyString)
                                 .setBfdValue(interfaceBfdValueString)
                                 .build());
index d4cd67ae6213a1cece9abda04924506406973e35..3fd87f9f4130fabcd3ce1101a020abf0c90610d0 100644 (file)
@@ -69,7 +69,7 @@ public class OvsdbQosRemovedCommand extends AbstractTransactionCommand {
     }
 
     private QosEntriesKey getQosEntriesKey(Node node, UUID qosUuid) {
-        List<QosEntries> qosList = node.getAugmentation(OvsdbNodeAugmentation.class).getQosEntries();
+        List<QosEntries> qosList = node.augmentation(OvsdbNodeAugmentation.class).getQosEntries();
         if (qosList == null || qosList.isEmpty()) {
             LOG.debug("Deleting Qos {}, Ovsdb Node {} does not have a Qos list.", qosUuid.toString(), node);
             return null;
@@ -79,7 +79,7 @@ public class OvsdbQosRemovedCommand extends AbstractTransactionCommand {
         while (itr.hasNext()) {
             QosEntries qos = itr.next();
             if (qos.getQosUuid().equals(quUuid)) {
-                return qos.getKey();
+                return qos.key();
             }
         }
         LOG.debug("Deleted Queue {} not found in Ovsdb Node {}", qosUuid.toString(), node);
index ed9857c219d0a7422d84b6bbe7c269a2fb5a64cd..cc294b7016e6998abbf61347d93dd86be38e6e2f 100644 (file)
@@ -114,7 +114,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand {
                 LOG.debug("Update Ovsdb Node {} with qos entries {}",ovsdbNode.get(), qosEntry);
                 InstanceIdentifier<QosEntries> iid = nodeIId
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(QosEntries.class, qosEntry.getKey());
+                        .child(QosEntries.class, qosEntry.key());
                 transaction.merge(LogicalDatastoreType.OPERATIONAL,
                         iid, qosEntry);
             }
@@ -160,7 +160,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand {
             return (InstanceIdentifier<Queues>) instanceIdentifierCodec.bindingDeserializerOrNull(
                     queue.getExternalIdsColumn().getData().get(SouthboundConstants.IID_EXTERNAL_ID_KEY));
         } else {
-            OvsdbNodeAugmentation node = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+            OvsdbNodeAugmentation node = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
             if (node.getQueues() != null && !node.getQueues().isEmpty()) {
                 for (Queues q : node.getQueues()) {
                     if (q.getQueueUuid().equals(new Uuid(queueUuid.toString()))) {
@@ -203,7 +203,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand {
             Qos qos, InstanceIdentifier<Node> nodeIId) {
         InstanceIdentifier<QosEntries> qosIId = nodeIId
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(QosEntries.class, qosEntryBuilder.build().getKey());
+                .child(QosEntries.class, qosEntryBuilder.build().key());
         Set<String> otherConfigKeys = oldOtherConfigs.keySet();
         for (String otherConfigKey : otherConfigKeys) {
             KeyedInstanceIdentifier<QosOtherConfig, QosOtherConfigKey> otherIId =
@@ -252,7 +252,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand {
             Qos qos, InstanceIdentifier<Node> nodeIId) {
         InstanceIdentifier<QosEntries> qosIId = nodeIId
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(QosEntries.class, qosEntryBuilder.build().getKey());
+                .child(QosEntries.class, qosEntryBuilder.build().key());
         Set<String> externalIdsKeys = oldExternalIds.keySet();
         for (String extIdKey : externalIdsKeys) {
             KeyedInstanceIdentifier<QosExternalIds, QosExternalIdsKey> externalIId =
@@ -301,7 +301,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand {
             Qos qos, InstanceIdentifier<Node> nodeIId) {
         InstanceIdentifier<QosEntries> qosIId = nodeIId
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(QosEntries.class, qosEntryBuilder.build().getKey());
+                .child(QosEntries.class, qosEntryBuilder.build().key());
         Collection<Long> queueListKeys = oldQueueList.keySet();
         for (Long queueListKey : queueListKeys) {
             KeyedInstanceIdentifier<QueueList, QueueListKey> otherIId =
index 63b4ab985bb8e594cb288a826c8b2ee0b3c42474..d530e53d6781de824ae233b13ce46ea0b70c4cd1 100644 (file)
@@ -69,7 +69,7 @@ public class OvsdbQueueRemovedCommand extends AbstractTransactionCommand {
     }
 
     private QueuesKey getQueueKey(Node node, UUID queueUuid) {
-        List<Queues> queueList = node.getAugmentation(OvsdbNodeAugmentation.class).getQueues();
+        List<Queues> queueList = node.augmentation(OvsdbNodeAugmentation.class).getQueues();
         if (queueList == null || queueList.isEmpty()) {
             LOG.debug("Deleting Queue {}, Ovsdb Node {} does not have a Queue list.", queueUuid.toString(), node);
             return null;
@@ -79,7 +79,7 @@ public class OvsdbQueueRemovedCommand extends AbstractTransactionCommand {
         while (itr.hasNext()) {
             Queues queue = itr.next();
             if (queue.getQueueUuid().equals(quUuid)) {
-                return queue.getKey();
+                return queue.key();
             }
         }
         LOG.debug("Deleted Queue {} not found in Ovsdb Node {}", queueUuid.toString(), node);
index 0ba2bff27130d8b37621af7dce1f078ba9e5bd89..53230bc790661c139dc11e910f3c246ae4eeab5e 100644 (file)
@@ -101,7 +101,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand {
                 LOG.debug("Update Ovsdb Node {} with queue entries {}",ovsdbNode.get(), queues);
                 InstanceIdentifier<Queues> iid = nodeIId
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(Queues.class, queues.getKey());
+                        .child(Queues.class, queues.key());
                 transaction.merge(LogicalDatastoreType.OPERATIONAL,
                         iid, queues);
             }
@@ -155,7 +155,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand {
             Queue queue, InstanceIdentifier<Node> nodeIId) {
         InstanceIdentifier<Queues> queueIId = nodeIId
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(Queues.class, queuesBuilder.build().getKey());
+                .child(Queues.class, queuesBuilder.build().key());
         Set<String> otherConfigKeys = oldOtherConfigs.keySet();
         for (String otherConfigKey : otherConfigKeys) {
             KeyedInstanceIdentifier<QueuesOtherConfig, QueuesOtherConfigKey> otherIId =
@@ -204,7 +204,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand {
             Queue queue, InstanceIdentifier<Node> nodeIId) {
         InstanceIdentifier<Queues> queueIId = nodeIId
                 .augmentation(OvsdbNodeAugmentation.class)
-                .child(Queues.class, queuesBuilder.build().getKey());
+                .child(Queues.class, queuesBuilder.build().key());
         Set<String> externalIdsKeys = oldExternalIds.keySet();
         for (String extIdKey : externalIdsKeys) {
             KeyedInstanceIdentifier<QueuesExternalIds, QueuesExternalIdsKey> externalIId =
index 614d642bf4489a777adce7a2511152de33fb1d9a..46531545821b1ebf136bd3f08a47b87307dbd931 100644 (file)
@@ -382,12 +382,12 @@ public class SouthboundMapperTest {
         List<ManagerEntry> managerEntriesCreated = new ArrayList<>();
 
         //ovsdbNodeAugmentation is null
-        when(ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(null);
+        when(ovsdbNode.augmentation(OvsdbNodeAugmentation.class)).thenReturn(null);
         assertEquals(managerEntriesCreated, SouthboundMapper.createManagerEntries(ovsdbNode, updatedManagerRows));
 
         //ovsdbNodeAugmentation not null
         OvsdbNodeAugmentation ovsdbNodeAugmentation = mock(OvsdbNodeAugmentation.class);
-        when(ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
+        when(ovsdbNode.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
 
         List<ManagerEntry> managerEntries = new ArrayList<>();
         ManagerEntry managerEntry = mock(ManagerEntry.class);
index 0a1895d1ad5a95ac4c1fbdca4f966d39f2879fe8..f54a5196dd7fc9bd97ce8015c6e639055012c451 100644 (file)
@@ -74,7 +74,7 @@ public class SouthboundUtilTest {
         Node node = mock(Node.class);
         OvsdbNodeAugmentation ovsdbNode = mock(OvsdbNodeAugmentation.class);
         when(nf.get()).thenReturn(Optional.of(node));
-        when(node.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNode);
+        when(node.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNode);
         assertEquals("Failed to return correct Optional object", Optional.of(ovsdbNode),
                 SouthboundUtil.getManagingNode(db, mn));
 
@@ -136,7 +136,7 @@ public class SouthboundUtilTest {
     public void testGetControllerTarget() throws Exception {
         Node ovsdbNode = mock(Node.class);
         OvsdbNodeAugmentation ovsdbNodeAugmentation = mock(OvsdbNodeAugmentation.class);
-        when(ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
+        when(ovsdbNode.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
         ConnectionInfo connectionInfo = mock(ConnectionInfo.class, Mockito.RETURNS_DEEP_STUBS);
         when(ovsdbNodeAugmentation.getConnectionInfo()).thenReturn(connectionInfo);
 
@@ -148,7 +148,7 @@ public class SouthboundUtilTest {
         String testTarget = SouthboundConstants.OPENFLOW_CONNECTION_PROTOCOL + ":"
                 + String.valueOf(ipAddress) + ":" + SouthboundConstants.DEFAULT_OPENFLOW_PORT;
         assertEquals("Incorrect controller IP", testTarget, SouthboundUtil.getControllerTarget(ovsdbNode));
-        verify(ovsdbNode).getAugmentation(OvsdbNodeAugmentation.class);
+        verify(ovsdbNode).augmentation(OvsdbNodeAugmentation.class);
         verify(ovsdbNodeAugmentation).getConnectionInfo();
 
         //ipAddr null case
index 389e363fd5cf070b68c86728b59c24dde1433222..6471044d2d7194679c6b598f847e93478890b15e 100644 (file)
@@ -87,7 +87,7 @@ public class BridgeOperationalStateTest {
         Optional<Node> optNode = Optional.of(node);
         when(briOperationState.getBridgeNode(any(InstanceIdentifier.class))).thenReturn(optNode);
         OvsdbBridgeAugmentation ovsdbBriAug = mock(OvsdbBridgeAugmentation.class);
-        when(node.getAugmentation(OvsdbBridgeAugmentation.class)).thenReturn(ovsdbBriAug);
+        when(node.augmentation(OvsdbBridgeAugmentation.class)).thenReturn(ovsdbBriAug);
         Optional<OvsdbBridgeAugmentation> ovsdbBriAugOptional = briOperationState.getOvsdbBridgeAugmentation(iid);
         assertNotNull(ovsdbBriAugOptional);
         assertTrue(ovsdbBriAugOptional.get() instanceof OvsdbBridgeAugmentation);
@@ -110,7 +110,7 @@ public class BridgeOperationalStateTest {
         when(briOperationState.getBridgeNode(any(InstanceIdentifier.class))).thenReturn(optNode);
         when(node.getTerminationPoint()).thenReturn(termPntList);
         TerminationPointKey termPntKey = mock(TerminationPointKey.class);
-        when(termPnt.getKey()).thenReturn(termPntKey);
+        when(termPnt.key()).thenReturn(termPntKey);
 
         final InstanceIdentifier<?> iid2 = PowerMockito.mock(InstanceIdentifier.class);
         //PowerMockito.suppress(MemberMatcher.method(InstanceIdentifier.class, "firstKeyOf", Class.class, Class.class));
@@ -135,7 +135,7 @@ public class BridgeOperationalStateTest {
         Optional<TerminationPoint> termPntOptional = Optional.of(termPoint);
         when(briOperationState.getBridgeTerminationPoint(any(InstanceIdentifier.class))).thenReturn(termPntOptional);
         OvsdbTerminationPointAugmentation ovsdbTermPntAug = mock(OvsdbTerminationPointAugmentation.class);
-        when(termPoint.getAugmentation(OvsdbTerminationPointAugmentation.class)).thenReturn(ovsdbTermPntAug);
+        when(termPoint.augmentation(OvsdbTerminationPointAugmentation.class)).thenReturn(ovsdbTermPntAug);
         Optional<OvsdbTerminationPointAugmentation> ovsdbTermPointOpt = briOperationState
                 .getOvsdbTerminationPointAugmentation(iid);
         assertNotNull(ovsdbTermPointOpt);
index 9ef1ab36d91e9fa458b09b163c0215ad12aef9f5..34274c29864e242e4342f010bc1064756b7dcaae 100644 (file)
@@ -98,7 +98,7 @@ public class TerminationPointUpdateCommandTest {
         OvsdbTerminationPointAugmentation terminationPoint = mock(OvsdbTerminationPointAugmentation.class);
         when(terminationPoint.getName()).thenReturn(TERMINATION_POINT_NAME);
         Node node = mock(Node.class);
-        when(node.getAugmentation(OvsdbBridgeAugmentation.class)).thenReturn(mock(OvsdbBridgeAugmentation.class));
+        when(node.augmentation(OvsdbBridgeAugmentation.class)).thenReturn(mock(OvsdbBridgeAugmentation.class));
         Optional<Node> optNode = Optional.of(node);
         when(state.getBridgeNode(any(InstanceIdentifier.class))).thenReturn(optNode);
 
index 06725c0ca280045e33a9f2d56dff5eb5d815b8c4..cb3ffb3d25bf38541b817a1d598702d01daf2da0 100644 (file)
@@ -121,18 +121,18 @@ public class BridgeConfigReconciliationTaskTest {
 
         when((InstanceIdentifier<Node>)ovsdbNodeRef.getValue()).thenReturn(iid);
         OvsdbBridgeName ovsdbBridgeName = new OvsdbBridgeName(bridgeName);
-        when(bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class)).thenReturn(ovsdbBridgeAugmentation);
+        when(bridgeNode.augmentation(OvsdbBridgeAugmentation.class)).thenReturn(ovsdbBridgeAugmentation);
         when(ovsdbBridgeAugmentation.getBridgeName()).thenReturn(ovsdbBridgeName);
         ProtocolEntry protocolEntry = mock(ProtocolEntry.class);
         ProtocolEntryKey protocolEntryKey = mock(ProtocolEntryKey.class);
         Mockito.when(protocolEntry.getProtocol()).thenAnswer(
                 (Answer<Class<? extends OvsdbBridgeProtocolBase>>) invocation -> OvsdbBridgeProtocolOpenflow10.class);
-        when(protocolEntry.getKey()).thenReturn(protocolEntryKey);
+        when(protocolEntry.key()).thenReturn(protocolEntryKey);
         when(ovsdbBridgeAugmentation.getProtocolEntry()).thenReturn(Collections.singletonList(protocolEntry));
 
         ControllerEntry controllerEntry = mock(ControllerEntry.class);
         ControllerEntryKey controllerEntryKey = mock(ControllerEntryKey.class);
-        when(controllerEntry.getKey()).thenReturn(controllerEntryKey);
+        when(controllerEntry.key()).thenReturn(controllerEntryKey);
         when(ovsdbBridgeAugmentation.getControllerEntry()).thenReturn(Collections.singletonList(controllerEntry));
 
         when(ovsdbBridgeAugmentation.getManagedBy()).thenReturn(ovsdbNodeRef);
@@ -141,7 +141,7 @@ public class BridgeConfigReconciliationTaskTest {
     }
 
     private Map<InstanceIdentifier<?>, DataObject> createExpectedConfigurationChanges(final Node bridgeNode) {
-        OvsdbBridgeAugmentation ovsdbBridge = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+        OvsdbBridgeAugmentation ovsdbBridge = bridgeNode.augmentation(OvsdbBridgeAugmentation.class);
 
         Map<InstanceIdentifier<?>, DataObject> changes = new HashMap<>();
         final InstanceIdentifier<Node> bridgeNodeIid =
@@ -152,12 +152,12 @@ public class BridgeConfigReconciliationTaskTest {
         changes.put(ovsdbBridgeIid, ovsdbBridge);
         for (ProtocolEntry protocolEntry : ovsdbBridge.getProtocolEntry()) {
             KeyedInstanceIdentifier<ProtocolEntry, ProtocolEntryKey> protocolIid =
-                    ovsdbBridgeIid.child(ProtocolEntry.class, protocolEntry.getKey());
+                    ovsdbBridgeIid.child(ProtocolEntry.class, protocolEntry.key());
             changes.put(protocolIid, protocolEntry);
         }
         for (ControllerEntry controller : ovsdbBridge.getControllerEntry()) {
             KeyedInstanceIdentifier<ControllerEntry, ControllerEntryKey> controllerIid =
-                    ovsdbBridgeIid.child(ControllerEntry.class, controller.getKey());
+                    ovsdbBridgeIid.child(ControllerEntry.class, controller.key());
             changes.put(controllerIid, controller);
         }
         return changes;
index 78fd5d28c0cc90a579857e75bae34d3c4b7b53f4..aefe0038728b752a986e1969779634d0207dc381 100644 (file)
@@ -96,13 +96,13 @@ public class OvsdbAutoAttachRemovedCommandTest {
         when(SouthboundMapper.createInstanceIdentifier(nodeId)).thenReturn(nodeIid);
 
         OvsdbNodeAugmentation ovsdbNodeAugmentation = mock(OvsdbNodeAugmentation.class);
-        when(node.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
+        when(node.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
         List<Autoattach> autoAttachList = new ArrayList<>();
         Autoattach aaEntry = mock(Autoattach.class);
         autoAttachList.add(aaEntry);
         when(aaEntry.getAutoattachUuid()).thenReturn(new Uuid(AUTOATTACH_UUID.toString()));
         when(ovsdbNodeAugmentation.getAutoattach()).thenReturn(autoAttachList);
-        when(aaEntry.getKey()).thenReturn(aaKey);
+        when(aaEntry.key()).thenReturn(aaKey);
 
         doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
     }
index c0e7ceb235d2d58f8960341d57901b1de707fc3f..137bb06be0b193998eb12cbb14c0af21c2f4bf62 100644 (file)
@@ -165,7 +165,7 @@ public class OvsdbControllerUpdateCommandTest {
         Optional<Node> ovsdbNode = Optional.of(node);
         when(SouthboundUtil.readNode(transaction, connectionIId)).thenReturn(ovsdbNode);
         OvsdbNodeAugmentation ovsdbNodeAugmentation = mock(OvsdbNodeAugmentation.class);
-        when(node.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
+        when(node.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
 
         List<ManagedNodeEntry> managedNodeEntries = new ArrayList<>();
         ManagedNodeEntry managedNodeEntry = mock(ManagedNodeEntry.class);
@@ -201,7 +201,7 @@ public class OvsdbControllerUpdateCommandTest {
         PowerMockito.whenNew(NodeKey.class).withAnyArguments().thenReturn(nodeKey);
         PowerMockito.whenNew(TopologyKey.class).withAnyArguments().thenReturn(mock(TopologyKey.class));
         //PowerMockito.suppress(MemberMatcher.methodsDeclaredIn(InstanceIdentifier.class));
-        when(controllerEntry.getKey()).thenReturn(mock(ControllerEntryKey.class));
+        when(controllerEntry.key()).thenReturn(mock(ControllerEntryKey.class));
         assertEquals(KeyedInstanceIdentifier.class, (Whitebox
                 .invokeMethod(ovsdbControllerUpdateCommand, "getControllerEntryIid", controllerEntry, BRIDGE_NAME)
                 .getClass()));
index cf638f7340e79127d297b35500ba2a0db4393b4e..714b2cf30f00cae7a800f05339ab3167b162e67f 100644 (file)
@@ -158,7 +158,7 @@ public class OvsdbManagersUpdateCommandTest {
         PowerMockito.whenNew(NodeId.class).withAnyArguments().thenReturn(nodeId);
         NodeKey nodeKey = mock(NodeKey.class);
         PowerMockito.whenNew(NodeKey.class).withAnyArguments().thenReturn(nodeKey);
-        when(managerEntry.getKey()).thenReturn(mock(ManagerEntryKey.class));
+        when(managerEntry.key()).thenReturn(mock(ManagerEntryKey.class));
         assertEquals(KeyedInstanceIdentifier.class,
                 Whitebox.invokeMethod(ovsdbManagersUpdateCommand, "getManagerEntryIid", managerEntry).getClass());
     }
index da19ccf7cfc711d7de4573257a0bae858f34078f..6d84398252ecff8c6b61cb5675afa3a698b39c0c 100644 (file)
@@ -80,7 +80,7 @@ public class OvsdbNodeRemoveCommandTest {
         Optional<Node> ovsdbNodeOptional = Optional.of(ovsdbNode);
         when(ovsdbNodeFuture.get()).thenReturn(ovsdbNodeOptional);
         OvsdbNodeAugmentation ovsdbNodeAugmentation = mock(OvsdbNodeAugmentation.class);
-        when(ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
+        when(ovsdbNode.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNodeAugmentation);
 
         PowerMockito.doReturn(true).when(ovsdbNodeRemoveCommand, "checkIfOnlyConnectedManager",
                 any(OvsdbNodeAugmentation.class));
index a08a3853c5a873ed693aa2a4cd8b66ba8ff0af5e..7b8321efc1065fed3a8530ec3655eff9c12ae17a 100644 (file)
@@ -189,7 +189,7 @@ public class OvsdbPortUpdateCommandTest {
         PowerMockito.whenNew(TerminationPointKey.class).withAnyArguments().thenReturn(tpKey);
         TerminationPointBuilder tpBuilder = mock(TerminationPointBuilder.class);
         PowerMockito.whenNew(TerminationPointBuilder.class).withNoArguments().thenReturn(tpBuilder);
-        when(tpBuilder.setKey(any(TerminationPointKey.class))).thenReturn(tpBuilder);
+        when(tpBuilder.withKey(any(TerminationPointKey.class))).thenReturn(tpBuilder);
         when(tpKey.getTpId()).thenReturn(mock(TpId.class));
         when(tpBuilder.setTpId(any(TpId.class))).thenReturn(tpBuilder);
         InstanceIdentifier<TerminationPoint> tpPath = mock(InstanceIdentifier.class);
@@ -352,7 +352,7 @@ public class OvsdbPortUpdateCommandTest {
     public void testGetTerminationPointBridge1() throws Exception {
         Node node = mock(Node.class);
         OvsdbNodeAugmentation ovsdbNode = mock(OvsdbNodeAugmentation.class);
-        when(node.getAugmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNode);
+        when(node.augmentation(OvsdbNodeAugmentation.class)).thenReturn(ovsdbNode);
         List<ManagedNodeEntry> managedNodes = new ArrayList<>();
         ManagedNodeEntry managedNodeEntry = mock(ManagedNodeEntry.class);
         managedNodes.add(managedNodeEntry);
@@ -371,7 +371,7 @@ public class OvsdbPortUpdateCommandTest {
         PowerMockito.whenNew(TerminationPointBuilder.class).withNoArguments().thenReturn(tpBuilder);
         PowerMockito.whenNew(TpId.class).withAnyArguments().thenReturn(mock(TpId.class));
         PowerMockito.whenNew(TerminationPointKey.class).withAnyArguments().thenReturn(mock(TerminationPointKey.class));
-        when(tpBuilder.setKey(any(TerminationPointKey.class))).thenReturn(tpBuilder);
+        when(tpBuilder.withKey(any(TerminationPointKey.class))).thenReturn(tpBuilder);
 
         List<TerminationPoint> terminationPointList = new ArrayList<>();
         TerminationPoint terminationPoint = mock(TerminationPoint.class);
@@ -379,7 +379,7 @@ public class OvsdbPortUpdateCommandTest {
         when(tpBuilder.build()).thenReturn(terminationPoint);
         when(managedNode.getTerminationPoint()).thenReturn(terminationPointList);
 
-        when(managedNode.getAugmentation(OvsdbBridgeAugmentation.class))
+        when(managedNode.augmentation(OvsdbBridgeAugmentation.class))
                 .thenReturn(mock(OvsdbBridgeAugmentation.class));
         TpId tpId = new TpId(TP_NAME);
         when(terminationPoint.getTpId()).thenReturn(tpId);
index 790b73875a19c519de588910763924584b0ec6f9..bf98ea9ae1058fdc59fb5073d0f8b8f5025c1f96 100644 (file)
@@ -432,7 +432,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 (InstanceIdentifier)iid), OPERATIONAL_LISTENER);
 
         ovsdbNode = connectOvsdbNode(connectionInfo);
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         assertNotNull("The OvsdbNodeAugmentation cannot be null", ovsdbNodeAugmentation);
         schemaVersion = Version.fromString(ovsdbNodeAugmentation.getDbVersion());
         LOG.info("schemaVersion = {}", schemaVersion);
@@ -623,7 +623,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     @Test
     public void testDpdkSwitch() throws InterruptedException {
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
-        List<DatapathTypeEntry> datapathTypeEntries = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class)
+        List<DatapathTypeEntry> datapathTypeEntries = ovsdbNode.augmentation(OvsdbNodeAugmentation.class)
                 .getDatapathTypeEntry();
         if (datapathTypeEntries == null) {
             LOG.info("DPDK not supported on this node.");
@@ -678,7 +678,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
                             for (TerminationPoint terminationPoint : terminationPoints) {
                                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation = terminationPoint
-                                        .getAugmentation(OvsdbTerminationPointAugmentation.class);
+                                        .augmentation(OvsdbTerminationPointAugmentation.class);
                                 if (ovsdbTerminationPointAugmentation.getName().equals(testPortname)) {
                                     Class<? extends InterfaceTypeBase> opPort = ovsdbTerminationPointAugmentation
                                             .getInterfaceType();
@@ -695,21 +695,21 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testOvsdbNodeOvsVersion() throws InterruptedException {
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         Assert.assertNotNull(ovsdbNodeAugmentation);
         assertNotNull(ovsdbNodeAugmentation.getOvsVersion());
     }
 
     @Test
     public void testOvsdbNodeDbVersion() throws InterruptedException {
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         Assert.assertNotNull(ovsdbNodeAugmentation);
         assertNotNull(ovsdbNodeAugmentation.getDbVersion());
     }
 
     @Test
     public void testOpenVSwitchOtherConfig() throws InterruptedException {
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = ovsdbNode.augmentation(OvsdbNodeAugmentation.class);
         Assert.assertNotNull(ovsdbNodeAugmentation);
         List<OpenvswitchOtherConfigs> otherConfigsList = ovsdbNodeAugmentation.getOpenvswitchOtherConfigs();
         if (otherConfigsList != null) {
@@ -820,7 +820,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         NodeId portNodeId = SouthboundMapper.createManagedNodeId(portIid);
         portNodeBuilder.setNodeId(portNodeId);
         TerminationPointBuilder entry = new TerminationPointBuilder();
-        entry.setKey(new TerminationPointKey(new TpId(portName)));
+        entry.withKey(new TerminationPointKey(new TpId(portName)));
         entry.addAugmentation(
                 OvsdbTerminationPointAugmentation.class,
                 ovsdbTerminationPointAugmentationBuilder.build());
@@ -934,7 +934,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     .build();
             InstanceIdentifier<Autoattach> iid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
-                    .child(Autoattach.class, aaEntry.getKey());
+                    .child(Autoattach.class, aaEntry.key());
             final NotifyingDataChangeListener aaOperationalListener =
                     new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, iid);
             aaOperationalListener.registerDataChangeListener();
@@ -1013,7 +1013,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                         .build();
                 InstanceIdentifier<Autoattach> iid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(Autoattach.class, updatedAa.getKey());
+                        .child(Autoattach.class, updatedAa.key());
                 final NotifyingDataChangeListener aaOperationalListener =
                         new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, iid);
                 aaOperationalListener.registerDataChangeListener();
@@ -1074,7 +1074,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         if (ovsdbNodeAugmentation.getAutoattach() != null
                 && !ovsdbNodeAugmentation.getAutoattach().isEmpty()) {
             for (Autoattach aa : ovsdbNodeAugmentation.getAutoattach()) {
-                if (aa.getKey().getAutoattachId().equals(uri)) {
+                if (aa.key().getAutoattachId().equals(uri)) {
                     return aa;
                 }
             }
@@ -1111,7 +1111,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 .build();
             InstanceIdentifier<QosEntries> qeIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
-                    .child(QosEntries.class, qosEntry.getKey());
+                    .child(QosEntries.class, qosEntry.key());
             final NotifyingDataChangeListener qosOperationalListener =
                     new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, qeIid);
             qosOperationalListener.registerDataChangeListener();
@@ -1176,7 +1176,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 .build();
             queueIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
-                    .child(Queues.class, queue.getKey());
+                    .child(Queues.class, queue.key());
             final NotifyingDataChangeListener queueOperationalListener =
                     new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, queueIid);
             queueOperationalListener.registerDataChangeListener();
@@ -1218,7 +1218,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         InstanceIdentifier<Node> nodeIid = SouthboundUtils.createInstanceIdentifier(connectionInfo);
         Node node = mdsalUtils.read(store, nodeIid);
         Assert.assertNotNull(node);
-        OvsdbNodeAugmentation ovsdbNodeAugmentation = node.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNodeAugmentation = node.augmentation(OvsdbNodeAugmentation.class);
         Assert.assertNotNull(ovsdbNodeAugmentation);
         return ovsdbNodeAugmentation;
     }
@@ -1240,7 +1240,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                                               LogicalDatastoreType store) {
         Node bridgeNode = getBridgeNode(connectionInfo, bridgeName, store);
         Assert.assertNotNull(bridgeNode);
-        OvsdbBridgeAugmentation ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+        OvsdbBridgeAugmentation ovsdbBridgeAugmentation = bridgeNode.augmentation(OvsdbBridgeAugmentation.class);
         Assert.assertNotNull(ovsdbBridgeAugmentation);
         return ovsdbBridgeAugmentation;
     }
@@ -1317,7 +1317,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         if (tpList == null) {
             return null;
         }
-        return tpList.get(index).getAugmentation(OvsdbTerminationPointAugmentation.class);
+        return tpList.get(index).augmentation(OvsdbTerminationPointAugmentation.class);
     }
 
     @Test
@@ -1349,7 +1349,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
             for (TerminationPoint terminationPoint : terminationPoints) {
                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                        terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                        terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     Long ifIndex = ovsdbTerminationPointAugmentation.getIfindex();
                     Assert.assertNotNull(ifIndex);
@@ -1387,7 +1387,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
             for (TerminationPoint terminationPoint : terminationPoints) {
                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                        terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                        terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     Long ofPort = ovsdbTerminationPointAugmentation.getOfport();
                     // if ephemeral port 45002 is in use, ofPort is set to 1
@@ -1433,7 +1433,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
             for (TerminationPoint terminationPoint : terminationPoints) {
                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                        terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                        terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     Long ofPort = ovsdbTerminationPointAugmentation.getOfport();
                     // if ephemeral port 45008 is in use, ofPort is set to 1
@@ -1532,7 +1532,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
                     portUpdateNodeBuilder.setNodeId(portUpdateNodeId);
                     TerminationPointBuilder tpUpdateBuilder = new TerminationPointBuilder();
-                    tpUpdateBuilder.setKey(new TerminationPointKey(new TpId(testBridgeAndPortName)));
+                    tpUpdateBuilder.withKey(new TerminationPointKey(new TpId(testBridgeAndPortName)));
                     tpUpdateBuilder.addAugmentation(
                             OvsdbTerminationPointAugmentation.class,
                             tpUpdateAugmentationBuilder.build());
@@ -1745,7 +1745,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
             OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation;
             for (TerminationPoint terminationPoint : terminationPoints) {
-                ovsdbTerminationPointAugmentation = terminationPoint.getAugmentation(
+                ovsdbTerminationPointAugmentation = terminationPoint.augmentation(
                         OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     VlanId actualVlanId = ovsdbTerminationPointAugmentation.getVlanTag();
@@ -1765,7 +1765,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
             portUpdateNodeBuilder.setNodeId(portUpdateNodeId);
             TerminationPointBuilder tpUpdateBuilder = new TerminationPointBuilder();
-            tpUpdateBuilder.setKey(new TerminationPointKey(new TpId(portName)));
+            tpUpdateBuilder.withKey(new TerminationPointKey(new TpId(portName)));
             tpUpdateBuilder.addAugmentation(
                     OvsdbTerminationPointAugmentation.class,
                     tpUpdateAugmentationBuilder.build());
@@ -1778,7 +1778,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             terminationPointNode = mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, terminationPointIid);
             terminationPoints = terminationPointNode.getTerminationPoint();
             for (TerminationPoint terminationPoint : terminationPoints) {
-                ovsdbTerminationPointAugmentation = terminationPoint.getAugmentation(
+                ovsdbTerminationPointAugmentation = terminationPoint.augmentation(
                         OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     VlanId actualVlanId = ovsdbTerminationPointAugmentation.getVlanTag();
@@ -1818,7 +1818,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
                 for (TerminationPoint terminationPoint : terminationPoints) {
                     OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                            terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                            terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         //test
                         Assert.assertTrue(ovsdbTerminationPointAugmentation.getVlanMode().equals(vlanMode));
@@ -1835,7 +1835,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
                 portUpdateNodeBuilder.setNodeId(portUpdateNodeId);
                 TerminationPointBuilder tpUpdateBuilder = new TerminationPointBuilder();
-                tpUpdateBuilder.setKey(new TerminationPointKey(new TpId(portName)));
+                tpUpdateBuilder.withKey(new TerminationPointKey(new TpId(portName)));
                 tpUpdateBuilder.addAugmentation(
                         OvsdbTerminationPointAugmentation.class,
                         tpUpdateAugmentationBuilder.build());
@@ -1849,7 +1849,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 terminationPoints = terminationPointNode.getTerminationPoint();
                 for (TerminationPoint terminationPoint : terminationPoints) {
                     OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                            terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                            terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         //test
                         Assert.assertEquals(updatedVlanMode, ovsdbTerminationPointAugmentation.getVlanMode());
@@ -1908,7 +1908,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
                 for (TerminationPoint terminationPoint : terminationPoints) {
                     OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                            terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                            terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         List<Trunks> actualTrunks = ovsdbTerminationPointAugmentation.getTrunks();
                         for (Trunks trunk : trunks) {
@@ -1928,7 +1928,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
                 portUpdateNodeBuilder.setNodeId(portUpdateNodeId);
                 TerminationPointBuilder tpUpdateBuilder = new TerminationPointBuilder();
-                tpUpdateBuilder.setKey(new TerminationPointKey(new TpId(portName)));
+                tpUpdateBuilder.withKey(new TerminationPointKey(new TpId(portName)));
                 tpUpdateBuilder.addAugmentation(
                         OvsdbTerminationPointAugmentation.class,
                         tpUpdateAugmentationBuilder.build());
@@ -1942,7 +1942,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 terminationPoints = terminationPointNode.getTerminationPoint();
                 for (TerminationPoint terminationPoint : terminationPoints) {
                     OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                            terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                            terminationPoint.augmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         //test
                         Assert.assertEquals(updatedTrunks, ovsdbTerminationPointAugmentation.getTrunks());
@@ -1991,7 +1991,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     new OvsdbTerminationPointAugmentationBuilder();
             tpUpdateAugmentationBuilder.setName(portName);
             TerminationPointBuilder tpUpdateBuilder = new TerminationPointBuilder();
-            tpUpdateBuilder.setKey(new TerminationPointKey(new TpId(portName)));
+            tpUpdateBuilder.withKey(new TerminationPointKey(new TpId(portName)));
             tpUpdateBuilder.addAugmentation(
                     OvsdbTerminationPointAugmentation.class,
                     tpUpdateAugmentationBuilder.build());
@@ -2094,7 +2094,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 final NodeBuilder bridgeUpdateNodeBuilder = new NodeBuilder();
                 final Node bridgeNode = getBridgeNode(connectionInfo, testBridgeName);
                 bridgeUpdateNodeBuilder.setNodeId(bridgeNode.getNodeId());
-                bridgeUpdateNodeBuilder.setKey(bridgeNode.getKey());
+                bridgeUpdateNodeBuilder.withKey(bridgeNode.key());
                 bridgeUpdateNodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class,
                         bridgeUpdateAugmentationBuilder.build());
                 Assert.assertTrue(mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, bridgeIid,
@@ -2202,7 +2202,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private Queues getQueue(Uri queueId, OvsdbNodeAugmentation node) {
         for (Queues queue : node.getQueues()) {
-            if (queue.getKey().getQueueId().getValue().equals(queueId.getValue())) {
+            if (queue.key().getQueueId().getValue().equals(queueId.getValue())) {
                 return queue;
             }
         }
@@ -2241,7 +2241,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private QosEntries getQos(Uri qosId, OvsdbNodeAugmentation node) {
         for (QosEntries qos : node.getQosEntries()) {
-            if (qos.getKey().getQosId().equals(qosId)) {
+            if (qos.key().getQosId().equals(qosId)) {
                 return qos;
             }
         }
@@ -2270,7 +2270,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     queuesBuilder.setQueueId(new Uri(testQueueId));
                     InstanceIdentifier<Queues> queueIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                             .augmentation(OvsdbNodeAugmentation.class)
-                            .child(Queues.class, queuesBuilder.build().getKey());
+                            .child(Queues.class, queuesBuilder.build().key());
                     final NotifyingDataChangeListener queueConfigurationListener =
                             new NotifyingDataChangeListener(LogicalDatastoreType.CONFIGURATION, queueIid);
                     queueConfigurationListener.registerDataChangeListener();
@@ -2364,7 +2364,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 queuesBuilder.setQueueId(new Uri(testQueueId));
                 InstanceIdentifier<Queues> queueIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                         .augmentation(OvsdbNodeAugmentation.class)
-                        .child(Queues.class, queuesBuilder.build().getKey());
+                        .child(Queues.class, queuesBuilder.build().key());
                 final NotifyingDataChangeListener queueOperationalListener =
                         new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, queueIid);
                 queueOperationalListener.registerDataChangeListener();
@@ -2412,7 +2412,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     qosBuilder.setQosId(new Uri(testQosId));
                     InstanceIdentifier<QosEntries> qosIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                             .augmentation(OvsdbNodeAugmentation.class)
-                            .child(QosEntries.class, qosBuilder.build().getKey());
+                            .child(QosEntries.class, qosBuilder.build().key());
                     final NotifyingDataChangeListener qosConfigurationListener =
                             new NotifyingDataChangeListener(LogicalDatastoreType.CONFIGURATION, qosIid);
                     qosConfigurationListener.registerDataChangeListener();
@@ -2507,7 +2507,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             qosBuilder.setQosId(new Uri(testQosId));
             InstanceIdentifier<QosEntries> qosIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
-                    .child(QosEntries.class, qosBuilder.build().getKey());
+                    .child(QosEntries.class, qosBuilder.build().key());
             final NotifyingDataChangeListener qosOperationalListener =
                     new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, qosIid);
             qosOperationalListener.registerDataChangeListener();
index 567de12cee823cc48ea17d6158a76f3f6dddc4b2..5c5f4c06e5b451b76f3c08b1ba192e0633e6d93e 100644 (file)
@@ -52,7 +52,7 @@ public class MdsalUtilsAsyncTest extends AbstractDataBrokerTest {
 
     private static final NodeId NODE_ID = new NodeId("test");
     private static final NodeKey NODE_KEY =  new NodeKey(NODE_ID);
-    private static final Node DATA = new NodeBuilder().setKey(NODE_KEY).setNodeId(NODE_ID).build();
+    private static final Node DATA = new NodeBuilder().withKey(NODE_KEY).setNodeId(NODE_ID).build();
 
     private static final InstanceIdentifier<Node> TEST_IID = InstanceIdentifier
             .create(NetworkTopology.class)
@@ -99,9 +99,9 @@ public class MdsalUtilsAsyncTest extends AbstractDataBrokerTest {
     @Test
     public void testPutWithoutCallback() {
         final String operationDesc = "testPut";
-        final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().setKey(
+        final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().withKey(
                 new SupportingNodeKey(new NodeId("id1"), TOPOLOGY_TEST)).build();
-        final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().setKey(
+        final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().withKey(
                 new SupportingNodeKey(new NodeId("id2"), TOPOLOGY_TEST)).build();
 
         final Node data1 = new NodeBuilder(DATA).setSupportingNode(
@@ -131,9 +131,9 @@ public class MdsalUtilsAsyncTest extends AbstractDataBrokerTest {
     @Test
     public void testMerge() {
         final String operationDesc = "testMerge";
-        final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().setKey(
+        final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().withKey(
                 new SupportingNodeKey(new NodeId("id1"), TOPOLOGY_TEST)).build();
-        final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().setKey(
+        final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().withKey(
                 new SupportingNodeKey(new NodeId("id2"), TOPOLOGY_TEST)).build();
 
         final Node data1 = new NodeBuilder(DATA).setSupportingNode(
index b30c62623ee8ef8e83d7535bb37e22f1a2de5233..1811a24564c4f53cb278b9149cd129393ad9fceb 100644 (file)
@@ -225,7 +225,7 @@ public class SouthboundUtils {
         InstanceIdentifier<TerminationPoint> terminationPointPath = InstanceIdentifier
                 .create(NetworkTopology.class)
                 .child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID))
-                .child(Node.class,node.getKey())
+                .child(Node.class,node.key())
                 .child(TerminationPoint.class, new TerminationPointKey(new TpId(portName)));
 
         LOG.debug("Termination point InstanceIdentifier generated : {}",terminationPointPath);
@@ -256,7 +256,7 @@ public class SouthboundUtils {
     }
 
     public OvsdbNodeAugmentation extractOvsdbNode(Node node) {
-        return node.getAugmentation(OvsdbNodeAugmentation.class);
+        return node.augmentation(OvsdbNodeAugmentation.class);
     }
 
     public static IpAddress createIpAddress(InetAddress address) {
@@ -398,7 +398,7 @@ public class SouthboundUtils {
         OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null;
         Node bridgeNode = getBridgeNode(connectionInfo, bridgeName, store);
         if (bridgeNode != null) {
-            ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+            ovsdbBridgeAugmentation = bridgeNode.augmentation(OvsdbBridgeAugmentation.class);
         }
         return ovsdbBridgeAugmentation;
     }
@@ -451,21 +451,21 @@ public class SouthboundUtils {
         ConnectionInfo connectionInfo = getConnectionInfo(ovsdbNode);
         if (connectionInfo != null) {
             InstanceIdentifier<Node> bridgeIid =
-                    createInstanceIdentifier(node.getKey(), name);
+                    createInstanceIdentifier(node.key(), name);
             bridgeNode = mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, bridgeIid);
         }
         return bridgeNode;
     }
 
     public OvsdbNodeAugmentation extractNodeAugmentation(Node node) {
-        return node.getAugmentation(OvsdbNodeAugmentation.class);
+        return node.augmentation(OvsdbNodeAugmentation.class);
     }
 
     public OvsdbBridgeAugmentation extractBridgeAugmentation(Node node) {
         if (node == null) {
             return null;
         }
-        return node.getAugmentation(OvsdbBridgeAugmentation.class);
+        return node.augmentation(OvsdbBridgeAugmentation.class);
     }
 
     public Node readOvsdbNode(Node bridgeNode) {
@@ -606,7 +606,7 @@ public class SouthboundUtils {
         ConnectionInfo connectionInfo = getConnectionInfo(ovsdbNode);
         if (connectionInfo != null) {
             NodeBuilder bridgeNodeBuilder = new NodeBuilder();
-            InstanceIdentifier<Node> bridgeIid = createInstanceIdentifier(ovsdbNode.getKey(), bridgeName);
+            InstanceIdentifier<Node> bridgeIid = createInstanceIdentifier(ovsdbNode.key(), bridgeName);
             NodeId bridgeNodeId = createManagedNodeId(bridgeIid);
             bridgeNodeBuilder.setNodeId(bridgeNodeId);
             OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder = new OvsdbBridgeAugmentationBuilder();
@@ -626,7 +626,7 @@ public class SouthboundUtils {
             bridgeOtherConfigsBuilder.setBridgeOtherConfigValue("true");
             otherConfigs.add(bridgeOtherConfigsBuilder.build());
             ovsdbBridgeAugmentationBuilder.setBridgeOtherConfigs(otherConfigs);
-            setManagedByForBridge(ovsdbBridgeAugmentationBuilder, ovsdbNode.getKey());
+            setManagedByForBridge(ovsdbBridgeAugmentationBuilder, ovsdbNode.key());
             if (dpType != null) {
                 ovsdbBridgeAugmentationBuilder.setDatapathType(dpType);
             }
@@ -671,7 +671,7 @@ public class SouthboundUtils {
         LOG.debug("setBridgeController: ovsdbNode: {}, bridgeNode: {}, controller(s): {}",
                 ovsdbNode, bridgeName, controllers);
 
-        InstanceIdentifier<Node> bridgeNodeIid = createInstanceIdentifier(ovsdbNode.getKey(), bridgeName);
+        InstanceIdentifier<Node> bridgeNodeIid = createInstanceIdentifier(ovsdbNode.key(), bridgeName);
         Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeNodeIid);
         if (bridgeNode == null) {
             LOG.info("setBridgeController could not find bridge in configuration {}", bridgeNodeIid);
@@ -706,7 +706,7 @@ public class SouthboundUtils {
 
         augBuilder.setControllerEntry(newControllerEntries);
         nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, augBuilder.build());
-        InstanceIdentifier<Node> bridgeIid = createInstanceIdentifier(ovsdbNode.getKey(), bridgeName);
+        InstanceIdentifier<Node> bridgeIid = createInstanceIdentifier(ovsdbNode.key(), bridgeName);
         return mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, bridgeIid, nodeBuilder.build());
     }
 
@@ -737,7 +737,7 @@ public class SouthboundUtils {
             List<Options> optionsList = new ArrayList<>();
             for (Map.Entry<String, String> entry : options.entrySet()) {
                 OptionsBuilder optionsBuilder = new OptionsBuilder();
-                optionsBuilder.setKey(new OptionsKey(entry.getKey()));
+                optionsBuilder.withKey(new OptionsKey(entry.getKey()));
                 optionsBuilder.setOption(entry.getKey());
                 optionsBuilder.setValue(entry.getValue());
                 optionsList.add(optionsBuilder.build());
@@ -749,7 +749,7 @@ public class SouthboundUtils {
             List<InterfaceExternalIds> externalIdsList = new ArrayList<>();
             for (Map.Entry<String, String> entry : externalIds.entrySet()) {
                 InterfaceExternalIdsBuilder interfaceExternalIdsBuilder = new InterfaceExternalIdsBuilder();
-                interfaceExternalIdsBuilder.setKey(new InterfaceExternalIdsKey(entry.getKey()));
+                interfaceExternalIdsBuilder.withKey(new InterfaceExternalIdsKey(entry.getKey()));
                 interfaceExternalIdsBuilder.setExternalIdKey(entry.getKey());
                 interfaceExternalIdsBuilder.setExternalIdValue(entry.getValue());
                 externalIdsList.add(interfaceExternalIdsBuilder.build());
@@ -759,7 +759,7 @@ public class SouthboundUtils {
 
         TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
         InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
-        tpBuilder.setKey(InstanceIdentifier.keyOf(tpIid));
+        tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
         tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
         /* TODO SB_MIGRATION should this be merge or mdsalUtils.put */
         return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
@@ -781,7 +781,7 @@ public class SouthboundUtils {
         List<Options> optionsList = new ArrayList<>();
         for (Map.Entry<String, String> entry : options.entrySet()) {
             OptionsBuilder optionsBuilder = new OptionsBuilder();
-            optionsBuilder.setKey(new OptionsKey(entry.getKey()));
+            optionsBuilder.withKey(new OptionsKey(entry.getKey()));
             optionsBuilder.setOption(entry.getKey());
             optionsBuilder.setValue(entry.getValue());
             optionsList.add(optionsBuilder.build());
@@ -790,7 +790,7 @@ public class SouthboundUtils {
 
         TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
         InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
-        tpBuilder.setKey(InstanceIdentifier.keyOf(tpIid));
+        tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
         tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
         /* TODO SB_MIGRATION should this be merge or mdsalUtils.put */
         return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
@@ -806,7 +806,7 @@ public class SouthboundUtils {
             tpAugmentationBuilder.setInterfaceType(OVSDB_INTERFACE_TYPE_MAP.get(type));
         }
         TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
-        tpBuilder.setKey(InstanceIdentifier.keyOf(tpIid));
+        tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
         tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
         return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
     }
@@ -974,7 +974,7 @@ public class SouthboundUtils {
     }
 
     public String getDatapathId(Node node) {
-        OvsdbBridgeAugmentation ovsdbBridgeAugmentation = node.getAugmentation(OvsdbBridgeAugmentation.class);
+        OvsdbBridgeAugmentation ovsdbBridgeAugmentation = node.augmentation(OvsdbBridgeAugmentation.class);
         return getDatapathId(ovsdbBridgeAugmentation);
     }
 
@@ -987,7 +987,7 @@ public class SouthboundUtils {
     }
 
     public String extractBridgeName(Node node) {
-        return node.getAugmentation(OvsdbBridgeAugmentation.class).getBridgeName().getValue();
+        return node.augmentation(OvsdbBridgeAugmentation.class).getBridgeName().getValue();
     }
 
     public boolean isBridgeOnOvsdbNode(Node ovsdbNode, String bridgeName) {
@@ -1011,10 +1011,10 @@ public class SouthboundUtils {
     public OvsdbBridgeAugmentation getBridgeFromConfig(Node node, String bridge) {
         OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null;
         InstanceIdentifier<Node> bridgeIid =
-                createInstanceIdentifier(node.getKey(), bridge);
+                createInstanceIdentifier(node.key(), bridge);
         Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeIid);
         if (bridgeNode != null) {
-            ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+            ovsdbBridgeAugmentation = bridgeNode.augmentation(OvsdbBridgeAugmentation.class);
         }
         return ovsdbBridgeAugmentation;
     }
@@ -1062,7 +1062,7 @@ public class SouthboundUtils {
     }
 
     public OvsdbTerminationPointAugmentation extractTerminationPointAugmentation(Node bridgeNode, String portName) {
-        if (bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class) != null) {
+        if (bridgeNode.augmentation(OvsdbBridgeAugmentation.class) != null) {
             List<OvsdbTerminationPointAugmentation> tpAugmentations = extractTerminationPointAugmentations(bridgeNode);
             for (OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation : tpAugmentations) {
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
@@ -1083,7 +1083,7 @@ public class SouthboundUtils {
         if (terminationPoints != null && !terminationPoints.isEmpty()) {
             for (TerminationPoint tp : terminationPoints) {
                 OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
-                        tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                        tp.augmentation(OvsdbTerminationPointAugmentation.class);
                 if (ovsdbTerminationPointAugmentation != null) {
                     tpAugmentations.add(ovsdbTerminationPointAugmentation);
                 }
@@ -1147,11 +1147,11 @@ public class SouthboundUtils {
      * @return the value for key or null if key not found
      */
     public String getOpenvswitchOtherConfig(Node node, String key) {
-        OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
+        OvsdbNodeAugmentation ovsdbNode = node.augmentation(OvsdbNodeAugmentation.class);
         if (ovsdbNode == null) {
             Node nodeFromReadOvsdbNode = readOvsdbNode(node);
             if (nodeFromReadOvsdbNode != null) {
-                ovsdbNode = nodeFromReadOvsdbNode.getAugmentation(OvsdbNodeAugmentation.class);
+                ovsdbNode = nodeFromReadOvsdbNode.augmentation(OvsdbNodeAugmentation.class);
             }
         }
 
@@ -1169,7 +1169,7 @@ public class SouthboundUtils {
     public static TerminationPoint getTerminationPointByExternalId(final Node bridgeNode, final String interfaceName) {
         if (bridgeNode.getTerminationPoint() != null) {
             for (TerminationPoint tp : bridgeNode.getTerminationPoint()) {
-                OvsdbTerminationPointAugmentation ovsdbTp = tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
+                OvsdbTerminationPointAugmentation ovsdbTp = tp.augmentation(OvsdbTerminationPointAugmentation.class);
                 String externalIdValue = getExternalInterfaceIdValue(ovsdbTp);
                 if (externalIdValue != null && externalIdValue.equals(interfaceName)) {
                     LOG.debug("Found matching termination point with iface-id {} on bridgeNode {}, returning tp {}",