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) {
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());
}
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;
}
}