import java.util.List;
import java.util.Locale;
import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;
import org.opendaylight.genius.utils.batching.ResourceBatchingManager;
import org.opendaylight.genius.utils.batching.ResourceBatchingManager.ShardResource;
this.l2GwDevice.getHwvtepNodeId(), this.elanName);
final String logicalSwitchName = ElanL2GatewayUtils.getLogicalSwitchFromElan(this.elanName);
List<MacAddress> macs = new ArrayList<>();
- macAddresses.forEach((mac) -> macs.add(new MacAddress(mac.getValue().toLowerCase(Locale.ENGLISH))));
+ macAddresses.forEach((mac) -> macs.add(new MacAddress(mac.getValue().toLowerCase(Locale.getDefault()))));
+
List<ListenableFuture<Void>> futures = new ArrayList<>();
- for (L2GatewayDevice otherDevice : ElanL2GwCacheUtils.getInvolvedL2GwDevices(this.elanName)) {
+ ConcurrentMap<String, L2GatewayDevice> elanL2GwDevices = ElanL2GwCacheUtils
+ .getInvolvedL2GwDevices(this.elanName);
+ for (L2GatewayDevice otherDevice : elanL2GwDevices.values()) {
if (!otherDevice.getHwvtepNodeId().equals(this.l2GwDevice.getHwvtepNodeId())
&& !ElanL2GatewayUtils.areMLAGDevices(this.l2GwDevice, otherDevice)) {
final String hwvtepId = otherDevice.getHwvtepNodeId();
*/
public static List<ListenableFuture<Void>> deleteRemoteUcastMacs(final NodeId nodeId,
String logicalSwitchName, final List<MacAddress> lstMac) {
- if (lstMac != null) {
+ if (lstMac != null && !lstMac.isEmpty()) {
return lstMac.stream()
.map(mac -> HwvtepSouthboundUtils.createRemoteUcastMacsInstanceIdentifier(
nodeId, logicalSwitchName, mac))