X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=elanmanager%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetvirt%2Felan%2Finternal%2FVpnDpnToTransportZoneListener.java;h=b7e52d47093bd02bbb01a4b6b29ffc415acf577f;hb=cf1ea9172b94fc17e45391b62bf4ca24ac5c5fe0;hp=434694ca6bc43f01d3ca3e65b0fe76fbf1a9042a;hpb=84a7d0a360f0d5f9b588e269840a92158d1be7d2;p=netvirt.git diff --git a/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/VpnDpnToTransportZoneListener.java b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/VpnDpnToTransportZoneListener.java index 434694ca6b..b7e52d4709 100644 --- a/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/VpnDpnToTransportZoneListener.java +++ b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/VpnDpnToTransportZoneListener.java @@ -7,6 +7,7 @@ */ package org.opendaylight.netvirt.elan.internal; +import java.util.ArrayList; import java.util.stream.Collectors; import javax.annotation.PreDestroy; import javax.inject.Inject; @@ -80,10 +81,12 @@ public class VpnDpnToTransportZoneListener boolean shouldCreateVtep; if (original.getVpnInterfaces() != null && !original.getVpnInterfaces().isEmpty()) { - shouldCreateVtep = transportZoneNotificationUtil.shouldCreateVtep(update.getVpnInterfaces().stream() - .filter(vi -> !original.getVpnInterfaces().contains(vi)).collect(Collectors.toList())); + shouldCreateVtep = transportZoneNotificationUtil + .shouldCreateVtep(update.getVpnInterfaces().values().stream() + .filter(vi -> !original.getVpnInterfaces().values().contains(vi)).collect(Collectors.toList())); } else { - shouldCreateVtep = transportZoneNotificationUtil.shouldCreateVtep(update.getVpnInterfaces()); + shouldCreateVtep = transportZoneNotificationUtil.shouldCreateVtep( + new ArrayList<>(update.getVpnInterfaces().values())); } if (shouldCreateVtep) { @@ -99,7 +102,8 @@ public class VpnDpnToTransportZoneListener } LOG.debug("Vpn dpn {} add detected, updating transport zones", add.getDpnId()); - boolean shouldCreateVtep = transportZoneNotificationUtil.shouldCreateVtep(add.getVpnInterfaces()); + boolean shouldCreateVtep = transportZoneNotificationUtil.shouldCreateVtep( + new ArrayList<>(add.getVpnInterfaces().values())); if (shouldCreateVtep) { String vrfId = identifier.firstKeyOf(VpnInstanceOpDataEntry.class).getVrfId(); transportZoneNotificationUtil.updateTransportZone(vrfId, add.getDpnId());