2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netvirt.elan.l2gw.jobs;
10 import java.util.List;
11 import java.util.concurrent.Callable;
13 import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
14 import org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 import com.google.common.collect.Lists;
19 import com.google.common.util.concurrent.ListenableFuture;
21 public class HwvtepDeviceMcastMacUpdateJob implements Callable<List<ListenableFuture<Void>>> {
22 private static final Logger LOG = LoggerFactory.getLogger(HwvtepDeviceMcastMacUpdateJob.class);
25 L2GatewayDevice l2GatewayDevice;
27 public HwvtepDeviceMcastMacUpdateJob(String elanName, L2GatewayDevice l2GatewayDevice) {
28 this.l2GatewayDevice = l2GatewayDevice;
29 this.elanName = elanName;
32 public String getJobKey() {
36 public List<ListenableFuture<Void>> call() throws Exception {
37 LOG.info("running update mcast mac entry job for {} {}",
38 elanName, l2GatewayDevice.getHwvtepNodeId());
39 return Lists.newArrayList(
40 ElanL2GatewayMulticastUtils.updateRemoteMcastMacOnElanL2GwDevice(elanName, l2GatewayDevice));