Optimizatoin to get the nodeIid from the DeviceOperCache in HwvtepPhysicalPortUpdateC... 61/82761/4
authorChandra Shekar S <chandra.shekar.s@ericsson.com>
Thu, 27 Jun 2019 13:04:35 +0000 (18:34 +0530)
committerChandra Shekar S <chandra.shekar.s@ericsson.com>
Tue, 2 Jul 2019 05:52:18 +0000 (11:22 +0530)
commitdd178906a032701dc6f357232fc970b65a10498b
treefb1631fd3a5a38296795aa6f26aaa7c431b564be
parent78f10814c6c8b9fb002da4b2f77e3a14868d4bdd
Optimizatoin to get the nodeIid from the DeviceOperCache in HwvtepPhysicalPortUpdateCommand

JIRA: OVSDB-482

Description :
Currently in HwvtepPhysicalPortUpdateCommand while updating the terminationpoint the
nodeIid/switchIid is retrieved from the incoming event data, if not present in the
incoming event data, it is retrieved from the DataStore by looking/looping at all
switches for that node which is ineffecient. The logic has chances of throwing NPE when
there are no PhisicalSwitches present for that node in the DataStore.

The change is to retrieve the nodeIid from the deviceOperCache , if not present get it from the
DataStore. The change also contains the handling of the NPE while retrieving the data from DataStore

Change-Id: Ifbfad7eb9cdac1c2eedb29ea9eb2a303ac8a9a3c
Signed-off-by: Chandra Shekar S <chandra.shekar.s@ericsson.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java