bug 7599 rename opData method as operData 33/53333/1
authorK.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
Wed, 15 Mar 2017 11:14:44 +0000 (16:44 +0530)
committerK.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
Wed, 15 Mar 2017 11:14:44 +0000 (16:44 +0530)
Change-Id: I468ce2289fe2e11bdec0445f960cf38bb0e9798b
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
17 files changed:
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependentJob.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/HwvtepLogicalSwitchRemoveCommand.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/HwvtepMacEntriesRemoveCommand.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/HwvtepOperationalCommandAggregator.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorRemoveCommand.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/HwvtepUcastMacsRemoteUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DependencyQueueTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalStateTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/UnMetDependencyGetterTest.java

index 3a0cc5ae8dd7d4db15d563195589c465ad916754..d217ebc034a9a7edfca6556358c360f7a15bda80 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -104,7 +104,7 @@ public class HwvtepDeviceInfo {
     }
 
     public LogicalSwitch getLogicalSwitch(UUID uuid) {
-        return (LogicalSwitch) getDeviceOpData(LogicalSwitches.class, uuid);
+        return (LogicalSwitch) getDeviceOperData(LogicalSwitches.class, uuid);
     }
 
     public Map<UUID, LogicalSwitch> getLogicalSwitches() {
@@ -135,7 +135,7 @@ public class HwvtepDeviceInfo {
     }
 
     public PhysicalLocator getPhysicalLocator(UUID uuid) {
-        return (PhysicalLocator) getDeviceOpData(TerminationPoint.class, uuid);
+        return (PhysicalLocator) getDeviceOperData(TerminationPoint.class, uuid);
     }
 
     public Map<UUID, PhysicalLocator> getPhysicalLocators() {
@@ -189,7 +189,7 @@ public class HwvtepDeviceInfo {
 
     public void markKeyAsInTransit(Class<? extends Identifiable> cls, InstanceIdentifier key) {
         LOG.debug("Marking device data as intransit {}", key);
-        DeviceData deviceData = getDeviceOpData(cls, key);
+        DeviceData deviceData = getDeviceOperData(cls, key);
         UUID uuid = null;
         Object data = null;
         if (deviceData != null) {
@@ -200,14 +200,14 @@ public class HwvtepDeviceInfo {
                 new DeviceData(key, uuid, data, DeviceDataStatus.IN_TRANSIT));
     }
 
-    public void updateDeviceOpData(Class<? extends Identifiable> cls, InstanceIdentifier key, UUID uuid, Object data) {
+    public void updateDeviceOperData(Class<? extends Identifiable> cls, InstanceIdentifier key, UUID uuid, Object data) {
         LOG.debug("Updating device data {}", key);
         HwvtepSouthboundUtil.updateData(opKeyVsData, cls, key,
                 new DeviceData(key, uuid, data, DeviceDataStatus.AVAILABLE));
         HwvtepSouthboundUtil.updateData(uuidVsData, cls, uuid, data);
     }
 
-    public void clearDeviceOpData(Class<? extends Identifiable> cls, InstanceIdentifier key) {
+    public void clearDeviceOperData(Class<? extends Identifiable> cls, InstanceIdentifier key) {
         DeviceData deviceData = HwvtepSouthboundUtil.getData(opKeyVsData, cls, key);
         if (deviceData != null && deviceData.uuid != null) {
             HwvtepSouthboundUtil.clearData(uuidVsData, cls, deviceData.uuid);
@@ -215,11 +215,11 @@ public class HwvtepDeviceInfo {
         HwvtepSouthboundUtil.clearData(opKeyVsData, cls, key);
     }
 
-    public Object getDeviceOpData(Class<? extends Identifiable> cls, UUID uuid) {
+    public Object getDeviceOperData(Class<? extends Identifiable> cls, UUID uuid) {
         return HwvtepSouthboundUtil.getData(uuidVsData, cls, uuid);
     }
 
-    public DeviceData getDeviceOpData(Class<? extends Identifiable> cls, InstanceIdentifier key) {
+    public DeviceData getDeviceOperData(Class<? extends Identifiable> cls, InstanceIdentifier key) {
         return HwvtepSouthboundUtil.getData(opKeyVsData, cls, key);
     }
 
@@ -239,7 +239,7 @@ public class HwvtepDeviceInfo {
         dependencyQueue.processReadyJobsFromConfigQueue(connectionInstance);
     }
 
-    public void onOpDataAvailable() {
+    public void onOperDataAvailable() {
         dependencyQueue.processReadyJobsFromOpQueue(connectionInstance);
     }
 
@@ -263,6 +263,6 @@ public class HwvtepDeviceInfo {
                 }
             }
         }
-        onOpDataAvailable();
+        onOperDataAvailable();
     }
 }
index 68dc795019fac98276f88589b83ffc0d8fc39858..478dd17b0dd6873e342b40cdc929700b4561d4d8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -99,7 +99,7 @@ public abstract class DependentJob<T extends Identifiable> {
 
         @Override
         protected boolean isDependencyMet(HwvtepDeviceInfo deviceInfo, Class cls, InstanceIdentifier iid) {
-            HwvtepDeviceInfo.DeviceData deviceData = deviceInfo.getDeviceOpData(cls, iid);
+            HwvtepDeviceInfo.DeviceData deviceData = deviceInfo.getDeviceOperData(cls, iid);
             return deviceData == null || deviceData.getStatus() != HwvtepDeviceInfo.DeviceDataStatus.IN_TRANSIT;
         }
     }
index 7a5f07dfe6f36089ddd3efdbcc840a57e6aee148..c757f6abbde614237037d16ea1fd88e6624eb86b 100644 (file)
@@ -28,8 +28,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Optional;
-
 public class UcastMacsRemoteRemoveCommand extends AbstractTransactCommand<RemoteUcastMacs, HwvtepGlobalAugmentation> {
     private static final Logger LOG = LoggerFactory.getLogger(UcastMacsRemoteRemoveCommand.class);
 
@@ -57,7 +55,7 @@ public class UcastMacsRemoteRemoveCommand extends AbstractTransactCommand<Remote
             InstanceIdentifier<RemoteUcastMacs> macIid = instanceIdentifier.augmentation(HwvtepGlobalAugmentation.class).
                     child(RemoteUcastMacs.class, mac.getKey());
             HwvtepDeviceInfo.DeviceData deviceData =
-                    getOperationalState().getDeviceInfo().getDeviceOpData(RemoteUcastMacs.class, macIid);
+                    getOperationalState().getDeviceInfo().getDeviceOperData(RemoteUcastMacs.class, macIid);
             UcastMacsRemote ucastMacsRemote = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(),
                     UcastMacsRemote.class, null);
             if (deviceData != null && deviceData.getUuid() != null) {
index b6b336fb745bd974153bc0c1936a767d657d7d4a..3c2c12636c7e4911167533929a19e9558c84c726 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.ovsdb.hwvtepsouthbound.transact;
 
-import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
@@ -19,13 +18,7 @@ import org.opendaylight.ovsdb.lib.notation.UUID;
 import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
 import org.opendaylight.ovsdb.lib.schema.typed.TyperUtils;
 import org.opendaylight.ovsdb.schema.hardwarevtep.UcastMacsRemote;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.EncapsulationTypeBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.EncapsulationTypeVxlanOverIpv4;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalLocatorAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalLocatorAugmentationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
@@ -36,13 +29,10 @@ import org.slf4j.LoggerFactory;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-
 public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand<RemoteUcastMacs, HwvtepGlobalAugmentation> {
     private static final Logger LOG = LoggerFactory.getLogger(UcastMacsRemoteUpdateCommand.class);
     private static final UcastMacUnMetDependencyGetter UCAST_MAC_DATA_VALIDATOR = new UcastMacUnMetDependencyGetter();
@@ -94,7 +84,7 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
                                    Object... extraData) {
             LOG.debug("Creating remoteUcastMacs, mac address: {}", remoteUcastMac.getMacEntryKey().getValue());
             HwvtepDeviceInfo.DeviceData deviceData =
-                    getOperationalState().getDeviceInfo().getDeviceOpData(RemoteUcastMacs.class, macKey);
+                    getOperationalState().getDeviceInfo().getDeviceOperData(RemoteUcastMacs.class, macKey);
 
             UcastMacsRemote ucastMacsRemote = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), UcastMacsRemote.class);
             setIpAddress(ucastMacsRemote, remoteUcastMac);
@@ -126,7 +116,7 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
             @SuppressWarnings("unchecked")
             InstanceIdentifier<LogicalSwitches> lswitchIid =
                     (InstanceIdentifier<LogicalSwitches>) inputMac.getLogicalSwitchRef().getValue();
-            HwvtepDeviceInfo.DeviceData deviceData = getOperationalState().getDeviceInfo().getDeviceOpData(
+            HwvtepDeviceInfo.DeviceData deviceData = getOperationalState().getDeviceInfo().getDeviceOperData(
                     LogicalSwitches.class, lswitchIid);
             if (deviceData != null && deviceData.getUuid() != null) {
                 ucastMacsRemote.setLogicalSwitch(deviceData.getUuid());
@@ -143,7 +133,7 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand<Remote
             @SuppressWarnings("unchecked")
             InstanceIdentifier<TerminationPoint> iid = (InstanceIdentifier<TerminationPoint>) inputMac.getLocatorRef().getValue();
             //try to find locator in operational DS
-            HwvtepDeviceInfo.DeviceData deviceData = getOperationalState().getDeviceInfo().getDeviceOpData(TerminationPoint.class, iid);
+            HwvtepDeviceInfo.DeviceData deviceData = getOperationalState().getDeviceInfo().getDeviceOperData(TerminationPoint.class, iid);
             if (deviceData != null) {
                 //if exist, get uuid
                 locatorUuid = deviceData.getUuid();
index 877fdb750cbaf4b87df4a479283917ee6d0d8123..f4dcab33eb182abc3173bf442d673d0b7d58e53b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -39,7 +39,7 @@ public class HwvtepLogicalSwitchRemoveCommand extends AbstractTransactionCommand
                     .child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(lSwitch.getName())));
             // TODO Delete any references
             transaction.delete(LogicalDatastoreType.OPERATIONAL, switchIid);
-            getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOpData(LogicalSwitches.class, switchIid);
+            getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOperData(LogicalSwitches.class, switchIid);
         }
     }
 
index 3b467c6fd0c16e08adbf97c92fb3e5a79131bae4..6bf757ea7f1a0e43f4fd45c50be2b90dc1cd0238 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -60,7 +60,7 @@ public class HwvtepLogicalSwitchUpdateCommand extends AbstractTransactionCommand
             InstanceIdentifier<LogicalSwitches> switchIid = getOvsdbConnectionInstance().getInstanceIdentifier()
                     .augmentation(HwvtepGlobalAugmentation.class)
                     .child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(lSwitch.getName())));
-            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOpData(LogicalSwitches.class, switchIid,
+            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOperData(LogicalSwitches.class, switchIid,
                     lSwitch.getUuid(), lSwitch);
             // TODO: Delete entries that are no longer needed
         }
index db392d5cf8b0f09284ac3b8bb0f4dbf0b49de063..88fcba9d34b482704317ffbe5c20876ba979f422 100644 (file)
@@ -84,7 +84,7 @@ public class HwvtepMacEntriesRemoveCommand extends AbstractTransactionCommand {
                                     new RemoteUcastMacsKey(getLogicalSwitchRef(rum.getLogicalSwitchColumn().getData()),
                                                     getMacAddress(rum.getMac())));
                 transaction.delete(LogicalDatastoreType.OPERATIONAL, rumId);
-                getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOpData(RemoteUcastMacs.class, rumId);
+                getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOperData(RemoteUcastMacs.class, rumId);
             } else {
                 LOG.debug("Failed to delete UcastMacRemote entry {}", rum.getUuid());
             }
@@ -121,7 +121,7 @@ public class HwvtepMacEntriesRemoveCommand extends AbstractTransactionCommand {
                                     new RemoteMcastMacsKey(getLogicalSwitchRef(rmm.getLogicalSwitchColumn().getData()),
                                                     getMacAddress(rmm.getMac())));
                 transaction.delete(LogicalDatastoreType.OPERATIONAL, lumId);
-                getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOpData(RemoteMcastMacs.class, lumId);
+                getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOperData(RemoteMcastMacs.class, lumId);
             } else {
                 LOG.debug("Failed to delete McastMacRemote entry {}", rmm.getUuid());
             }
index ec13f52530d47dd43f6bbb5421f14155095f5948..75647d49cd04676d9338f6d85c8801eb0b3a09fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -75,7 +75,7 @@ public class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactionComma
             Node connectionNode = buildConnectionNode(mMacRemote);
             transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode);
             InstanceIdentifier<RemoteMcastMacs> macIid = getMacIid(connectionIId, connectionNode);
-            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOpData(RemoteMcastMacs.class,
+            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOperData(RemoteMcastMacs.class,
                     macIid, mMacRemote.getUuid(), mMacRemote);
             // TODO: Delete entries that are no longer needed
         }
index 4eba084d7caef9a9a15bc6b410e496e578b0037a..2dd180b807885856485ccfe961dd9e041d57ef48 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -49,6 +49,6 @@ public class HwvtepOperationalCommandAggregator implements TransactionCommand {
         for (TransactionCommand command: commands) {
             command.execute(transaction);
         }
-        connectionInstance.getDeviceInfo().onOpDataAvailable();
+        connectionInstance.getDeviceInfo().onOperDataAvailable();
     }
 }
index cb9499c4fb6e768bcc1632ad03eef277e3e550c0..1ec605132c57459ca07bb74cb7b6d5fc193e04bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015 - 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -37,7 +37,7 @@ public class HwvtepPhysicalLocatorRemoveCommand extends AbstractTransactionComma
             final InstanceIdentifier<TerminationPoint> nodePath = HwvtepSouthboundMapper
                     .createInstanceIdentifier(connectionIId, pLoc);
             transaction.delete(LogicalDatastoreType.OPERATIONAL, nodePath);
-            getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOpData(TerminationPoint.class, nodePath);
+            getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOperData(TerminationPoint.class, nodePath);
 
             //TODO: Check if any cleanup is required
         }
index 86d11f37df1ad3095cf9661f635f66a1b6a5b8ff..df04b2462ecbb4f22d58680ae4ecfe5bae4e2a3f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015 - 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -79,7 +79,7 @@ public class HwvtepPhysicalLocatorUpdateCommand extends AbstractTransactionComma
                     transaction.put(LogicalDatastoreType.OPERATIONAL,
                             tpPath, tpBuilder.build());
                 }
-                getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOpData(
+                getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOperData(
                         TerminationPoint.class, tpPath, pLoc.getUuid(), pLoc);
             }
         }
index 30a0129f667919889b3c0174bf3b7976d11f0722..a6ff82ad39eff4841ab6ec461320dc414c9f9e51 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -66,7 +66,7 @@ public class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionComma
             Node connectionNode = buildConnectionNode(ucastMacsRemote);
             transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode);
             InstanceIdentifier<RemoteUcastMacs> macIid = getMacIid(connectionIId, connectionNode);
-            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOpData(RemoteUcastMacs.class, macIid,
+            getOvsdbConnectionInstance().getDeviceInfo().updateDeviceOperData(RemoteUcastMacs.class, macIid,
                     ucastMacsRemote.getUuid(), ucastMacsRemote);
             //TODO: Handle any deletes
         }
index 735169b0b383b518ee6be0ac61f7fc8d3eff0ec5..fab640c4299d0ce9e68aa0844452f32f422052d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -99,11 +99,11 @@ public class DependencyQueueTest extends DataChangeListenerTestBase {
                 latch.countDown();
             }
         });
-        opState.getDeviceInfo().onOpDataAvailable();
+        opState.getDeviceInfo().onOperDataAvailable();
         assertEquals(1, latch.getCount());
 
-        opState.getDeviceInfo().updateDeviceOpData(LogicalSwitches.class, lsIid, new UUID("ls0"), "ls0");
-        opState.getDeviceInfo().onOpDataAvailable();
+        opState.getDeviceInfo().updateDeviceOperData(LogicalSwitches.class, lsIid, new UUID("ls0"), "ls0");
+        opState.getDeviceInfo().onOperDataAvailable();
         assertEquals(0, latch.getCount());
 
     }
index aa7ab240b352dc58f9c4e47a15f83696f6257d17..c7189b7bbf3adfa849a2ddbc26400f95e99f78fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -285,7 +285,7 @@ public class HwvtepDataChangeListenerTest extends DataChangeListenerTestBase {
         resetOperations();
         addData(OPERATIONAL, TerminationPoint.class, terminationPoints);
         addData(OPERATIONAL, RemoteUcastMacs.class, ucastMacs);
-        connectionInstance.getDeviceInfo().onOpDataAvailable();
+        connectionInstance.getDeviceInfo().onOperDataAvailable();
         //2 mcast mac + 2 locator sets ( termination point already added )
         verify(Operations.op,  times(4)).insert(Matchers.<McastMacsRemote>any());
 
@@ -293,7 +293,7 @@ public class HwvtepDataChangeListenerTest extends DataChangeListenerTestBase {
         addData(CONFIGURATION, RemoteMcastMacs.class, mcastMac2);
         verify(Operations.op,  times(0)).insert(Matchers.<McastMacsRemote>any());
         addData(OPERATIONAL, RemoteMcastMacs.class, mcastMacs);
-        connectionInstance.getDeviceInfo().onOpDataAvailable();
+        connectionInstance.getDeviceInfo().onOperDataAvailable();
         verify(Operations.op,  times(2)).insert(Matchers.<McastMacsRemote>any());
         verify(Operations.op,  times(2)).update(Matchers.<McastMacsRemote>any());
     }
index d139a5c28f9a28aa9d8cd4d6ab06a357f532b0a7..bb63e618ea067027ca131430bc9ce43135167152 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -87,11 +87,11 @@ public class HwvtepOperationalDataChangeListener implements ClusteredDataTreeCha
         InstanceIdentifier instanceIdentifier = getKey(key, mod, mod.getDataAfter());
         switch(type) {
             case WRITE:
-                connectionInstance.getDeviceInfo().updateDeviceOpData(childClass, instanceIdentifier,
+                connectionInstance.getDeviceInfo().updateDeviceOperData(childClass, instanceIdentifier,
                         new UUID("uuid"), mod.getDataAfter());
                 break;
             case DELETE:
-                connectionInstance.getDeviceInfo().clearDeviceOpData(childClass, instanceIdentifier);
+                connectionInstance.getDeviceInfo().clearDeviceOperData(childClass, instanceIdentifier);
                 break;
             case SUBTREE_MODIFIED:
         }
index 45c010176811131d8098fd0fe1d492a4f86d61cf..c6d77e2998d8acb59b39fd601ceb41c7bc9924ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -10,7 +10,6 @@ package org.opendaylight.ovsdb.hwvtepsouthbound;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.opendaylight.controller.md.sal.binding.test.AbstractDataBrokerTest;
 import org.opendaylight.ovsdb.hwvtepsouthbound.transact.HwvtepOperationalState;
 import org.opendaylight.ovsdb.lib.notation.UUID;
 import org.opendaylight.ovsdb.lib.operations.Operations;
@@ -18,9 +17,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeName;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey;
-import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
@@ -29,8 +26,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.when;
-import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({HwvtepConnectionInstance.class, HwvtepConnectionManager.class, Operations.class})
@@ -59,7 +54,7 @@ public class HwvtepOperationalStateTest extends DataChangeListenerTestBase {
         result = opState.getDeviceInfo().isKeyInTransit(LogicalSwitches.class, lsIid);
         assertTrue(result);
 
-        opState.getDeviceInfo().updateDeviceOpData(LogicalSwitches.class, lsIid, uuid, lsIid);
+        opState.getDeviceInfo().updateDeviceOperData(LogicalSwitches.class, lsIid, uuid, lsIid);
         result = opState.getDeviceInfo().isKeyInTransit(LogicalSwitches.class, lsIid);
         assertFalse(result);
 
index 50bf72006f4ca84b13ed19a7daa576feab71f374..1cd938df3d7d0383a5dfbad7f6377bc7451255ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -77,7 +77,7 @@ public class UnMetDependencyGetterTest extends DataChangeListenerTestBase {
         unMetDependencies = MCAST_MAC_DATA_VALIDATOR.getInTransitDependencies(opState, mac);
         assertEquals(1, unMetDependencies.size());
 
-        opState.getDeviceInfo().updateDeviceOpData(LogicalSwitches.class, lsIid, new UUID("ls0"), "ls0");
+        opState.getDeviceInfo().updateDeviceOperData(LogicalSwitches.class, lsIid, new UUID("ls0"), "ls0");
         unMetDependencies = MCAST_MAC_DATA_VALIDATOR.getInTransitDependencies(opState, mac);
         assertEquals(0, unMetDependencies.size());
     }