Fix Iid for locator-refs in HwvtepTunnelUpdate 57/38357/1
authorVishal Thapar <vishal.thapar@ericsson.com>
Wed, 4 May 2016 06:53:12 +0000 (12:23 +0530)
committerVishal Thapar <vishal.thapar@ericsson.com>
Wed, 4 May 2016 06:53:12 +0000 (12:23 +0530)
Local and remote locator ref IIDs are off NodeID, not physical switch IID.
The iid for tunnels was generated correctly but locators stored in data
were using incorrect Iid.

Change-Id: Ida585feeb5c1bf419d1123c5ecbe0dbdf99486af
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java

index f3fc4a3301562d03525c331017530ff4551712c9..ae70e34f4c3fc27b2932854550bc009b6b0fd6b0 100644 (file)
@@ -85,10 +85,10 @@ public class HwvtepTunnelUpdateCommand extends AbstractTransactionCommand {
         InstanceIdentifier<Tunnels> tunnelIid = getInstanceIdentifier(psIid, tunnel);
         if (connection.isPresent() && pSwitch != null && tunnelIid != null) {
             TunnelsBuilder tBuilder = new TunnelsBuilder();
-            tBuilder.setLocalLocatorRef(new HwvtepPhysicalLocatorRef(
-                            getPhysicalLocatorRefFromUUID(psIid, (tunnel.getLocalColumn().getData()))));
-            tBuilder.setRemoteLocatorRef(new HwvtepPhysicalLocatorRef(
-                            getPhysicalLocatorRefFromUUID(psIid, (tunnel.getRemoteColumn().getData()))));
+            tBuilder.setLocalLocatorRef(new HwvtepPhysicalLocatorRef(getPhysicalLocatorRefFromUUID(
+                    getOvsdbConnectionInstance().getInstanceIdentifier(), (tunnel.getLocalColumn().getData()))));
+            tBuilder.setRemoteLocatorRef(new HwvtepPhysicalLocatorRef(getPhysicalLocatorRefFromUUID(
+                    getOvsdbConnectionInstance().getInstanceIdentifier(), (tunnel.getRemoteColumn().getData()))));
             tBuilder.setTunnelUuid(new Uuid(tunnel.getUuid().toString()));
             setBfdLocalConfigs(tBuilder, tunnel);
             setBfdRemoteConfigs(tBuilder, tunnel);