Reduce info logging in VpnUtils.getRts
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnUtil.java
index 35081e1eef7462a285faf6b4a3080bfaf1b76684..c486d3a0ed6deb4e0be3b6897bf4eaec89e33906 100644 (file)
@@ -1730,12 +1730,12 @@ public final class VpnUtil {
         List<String> rts = new ArrayList<>();
         VpnTargets targets = vpnInstance.getVpnTargets();
         if (targets == null) {
-            LOG.info("getRts: vpn targets not available for {}", name);
+            LOG.debug("getRts: vpn targets not available for {}", name);
             return rts;
         }
         List<VpnTarget> vpnTargets = targets.getVpnTarget();
         if (vpnTargets == null) {
-            LOG.info("getRts: vpnTarget values not available for {}", name);
+            LOG.debug("getRts: vpnTarget values not available for {}", name);
             return rts;
         }
         for (VpnTarget target : vpnTargets) {
@@ -2300,7 +2300,7 @@ public final class VpnUtil {
         return VpnConstants.IP_MONITOR_JOB_PREFIX_KEY + "-" + vpnName + "-" + ip;
     }
 
-    public List<String> getVpnListForVpnInterface(VpnInterface vpnInter) {
+    public static List<String> getVpnListForVpnInterface(VpnInterface vpnInter) {
         return requireNonNullElse(vpnInter.getVpnInstanceNames(), Collections.<VpnInstanceNames>emptyList()).stream()
                 .map(VpnInstanceNames::getVpnName).collect(Collectors.toList());
     }
@@ -2333,11 +2333,8 @@ public final class VpnUtil {
         return obj != null ? obj : requireNonNull(defaultObj);
     }
 
-    public boolean isDualRouterVpnUpdate(List<String> oldVpnListCopy, List<String> newVpnListCopy) {
-        if (oldVpnListCopy.size() == 2 && newVpnListCopy.size() == 3
-                || oldVpnListCopy.size() == 3 && newVpnListCopy.size() == 2) {
-            return true;
-        }
-        return false;
+    public static boolean isDualRouterVpnUpdate(List<String> oldVpnListCopy, List<String> newVpnListCopy) {
+        return oldVpnListCopy.size() == 2 && newVpnListCopy.size() == 3
+                || oldVpnListCopy.size() == 3 && newVpnListCopy.size() == 2;
     }
 }