Avoid push the stale vlan to tor. 67/88767/3
authorChandra Shekar S <chandra.shekar.s@ericsson.com>
Sun, 29 Mar 2020 07:31:16 +0000 (13:01 +0530)
committerChetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Wed, 1 Apr 2020 10:25:34 +0000 (10:25 +0000)
If the ls is not present on the tor, don't push the vlan for that ls

Signed-off-by: Chandra Shekar S <chandra.shekar.s@ericsson.com>
Change-Id: I2362f33eacac3a8cf39fe8d9f1668ce7477f31ad

hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java

index 9b9bce98191a13e318fe9e75c571dcff493b6d38..521bc08aed3e630e61f18230b15c4f74bd158544 100644 (file)
@@ -140,8 +140,12 @@ public class PhysicalPortUpdateCommand extends AbstractTransactCommand {
                     continue;
                 }
 
-                bindingMap.put(vlanBinding.getVlanIdKey().getValue().longValue(),
-                        TransactUtils.getLogicalSwitchUUID(transaction, getOperationalState(), lswitchIid));
+                UUID lsUUid = TransactUtils.getLogicalSwitchUUID(transaction, getOperationalState(), lswitchIid);
+                if (lsUUid == null) {
+                    LOG.error("Could not get the logical switch uuid for {}", vlanBinding);
+                    continue;
+                }
+                bindingMap.put(vlanBinding.getVlanIdKey().getValue().longValue(), lsUUid);
             }
             physicalPort.setVlanBindings(bindingMap);
         }
index eb617b811a145fe1f019d533345dd11fd5c964f4..65cb7dd1c87c9f6cbd5ca3ebfbaf2856c1cccfc3 100644 (file)
@@ -121,7 +121,7 @@ public class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransactionComman
                         PhysicalLocator locator = updatedPLocRows.get(locUUID);
                         if (locator == null) {
                             locator = (PhysicalLocator) getOvsdbConnectionInstance()
-                                    .getDeviceInfo().getDeviceOperData(TerminationPoint.class, locUUID);
+                                    .getDeviceInfo().getPhysicalLocator(locUUID);
                         }
                         InstanceIdentifier<TerminationPoint> tpIid = HwvtepSouthboundMapper.createInstanceIdentifier(
                                 getOvsdbConnectionInstance().getInstanceIdentifier(), locator);
index e039437d3f20c07cdd3843ee048c58b20e289491..addcd8adf34b0cbb4c5ce4b525941a665ac26405 100644 (file)
@@ -91,7 +91,7 @@ public class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransactionComman
             PhysicalLocator physicalLocator = updatedPLocRows.get(plocUUID);
             if (physicalLocator == null) {
                 physicalLocator = (PhysicalLocator) getOvsdbConnectionInstance()
-                        .getDeviceInfo().getDeviceOperData(TerminationPoint.class, plocUUID);
+                        .getDeviceInfo().getPhysicalLocator(plocUUID);
             }
             if (physicalLocator != null) {
                 InstanceIdentifier<TerminationPoint> plIid =
index be1b0cd3cbbfcf47ab3ad7dc571ca5b46f1cc9b1..98fa5a514d1197d5558ff607f7ef13ebe6d6f63e 100644 (file)
@@ -88,7 +88,7 @@ public class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionComma
             PhysicalLocator physicalLocator = updatedPLocRows.get(locUUID);
             if (physicalLocator == null) {
                 physicalLocator = (PhysicalLocator) getOvsdbConnectionInstance()
-                        .getDeviceInfo().getDeviceOperData(TerminationPoint.class, locUUID);
+                        .getDeviceInfo().getPhysicalLocator(locUUID);
             }
             if (physicalLocator != null) {
                 InstanceIdentifier<TerminationPoint> plIid = HwvtepSouthboundMapper.createInstanceIdentifier(nodeIid,