BUG 5399: HWVTEP Tunnels not added to OperDS 94/35394/1
authorVishal Thapar <vishal.thapar@ericsson.com>
Thu, 25 Feb 2016 08:43:27 +0000 (14:13 +0530)
committerSam Hague <shague@redhat.com>
Thu, 25 Feb 2016 13:09:15 +0000 (13:09 +0000)
Populating tunnels list in physical switch table is not updating topology
operational DS. PhysicalSwitchUpdate.setTunnels() is making a wrong check for
isEmpty() to determine if data needs to be added to data store or not. It should be !isEmpty()

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

index c7ef2916f8431ca83e09fd4f2768ccca23fcb981..696bc8a737d8322e7800b86880e5d89f25c4d4b2 100644 (file)
@@ -125,7 +125,7 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactionCommand {
     private void setTunnels(Node node, PhysicalSwitchAugmentationBuilder psAugmentationBuilder,
             PhysicalSwitch pSwitch) {
         if (pSwitch.getTunnels() != null && pSwitch.getTunnels().getData() != null
-                && pSwitch.getTunnels().getData().isEmpty()) {
+                && !pSwitch.getTunnels().getData().isEmpty()) {
             Set<UUID> uuidList = pSwitch.getTunnels().getData();
             List<Tunnels> tunnelList = new ArrayList<>();
             TunnelsBuilder tBuilder = new TunnelsBuilder();