X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=elanmanager%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetvirt%2Felan%2Fl2gw%2Fjobs%2FHwvtepDeviceMcastMacUpdateJob.java;fp=elanmanager%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetvirt%2Felan%2Fl2gw%2Fjobs%2FHwvtepDeviceMcastMacUpdateJob.java;h=8afa131bfc9a32128bf8af4968ede2c226426548;hb=72bd2d39aefb0e36308765cd15b3bdbda8275fc7;hp=0000000000000000000000000000000000000000;hpb=ac705c757603b2552656b5df27257096cc768543;p=netvirt.git diff --git a/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/jobs/HwvtepDeviceMcastMacUpdateJob.java b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/jobs/HwvtepDeviceMcastMacUpdateJob.java new file mode 100644 index 0000000000..8afa131bfc --- /dev/null +++ b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/jobs/HwvtepDeviceMcastMacUpdateJob.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.netvirt.elan.l2gw.jobs; + +import com.google.common.util.concurrent.ListenableFuture; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.Callable; +import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils; +import org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HwvtepDeviceMcastMacUpdateJob implements Callable>> { + private static final Logger LOG = LoggerFactory.getLogger(HwvtepDeviceMcastMacUpdateJob.class); + + private final ElanL2GatewayMulticastUtils elanL2GatewayMulticastUtils; + private final String elanName; + private final L2GatewayDevice l2GatewayDevice; + + public HwvtepDeviceMcastMacUpdateJob(ElanL2GatewayMulticastUtils elanL2GatewayMulticastUtils, String elanName, + L2GatewayDevice l2GatewayDevice) { + this.elanL2GatewayMulticastUtils = elanL2GatewayMulticastUtils; + this.l2GatewayDevice = l2GatewayDevice; + this.elanName = elanName; + } + + public String getJobKey() { + return elanName; + } + + @Override + public List> call() throws Exception { + LOG.info("running update mcast mac entry job for {} {}", + elanName, l2GatewayDevice.getHwvtepNodeId()); + return Collections.singletonList( + elanL2GatewayMulticastUtils.updateRemoteMcastMacOnElanL2GwDevice(elanName, l2GatewayDevice)); + } + +}