LLDP monitor interval update fixes 49/37649/2
authorKiran N Upadhyaya <kiran.n.upadhyaya@ericsson.com>
Fri, 1 Apr 2016 09:40:00 +0000 (15:10 +0530)
committerKiran N Upadhyaya <kiran.n.upadhyaya@ericsson.com>
Fri, 15 Apr 2016 09:37:19 +0000 (09:37 +0000)
Updating LLDP monitor interval by deleting the old monitor profile and
creating a new one based on existing monitor profiles

Change-Id: I42c105e40eecfab02cb8da78327cd2733720ec5a
Signed-off-by: Kiran N Upadhyaya <kiran.n.upadhyaya@ericsson.com>
interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/AlivenessMonitorUtils.java

index 98c1a6ff61c05d6653d494c650aec1aa6b4f6e44..12992dc9717a74078e44760d47c47d0ed496c507 100644 (file)
@@ -146,7 +146,7 @@ public class AlivenessMonitorUtils {
         LOG.debug("handling tunnel monitoring updates for interface {}", interfaceName);
         // Restart LLDP monitoring only if it's started already
         List<Long> monitorIds = getMonitorIdForInterface(dataBroker, interfaceName);
-        if (monitorIds != null && monitorIds.size() > 1) {
+        if (monitorIds != null && !monitorIds.isEmpty()) {
                 stopLLDPMonitoring(alivenessMonitorService, dataBroker, interfaceOld);
                 if(ifTunnelNew.isMonitorEnabled()) {
                     startLLDPMonitoring(alivenessMonitorService, dataBroker, interfaceNew);