import java.util.List;
import java.util.concurrent.Callable;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.netvirt.elan.l2gw.listeners.HwvtepRemoteMcastMacListener;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
import org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.slf4j.Logger;
new NodeId(elanL2GwDevice.getHwvtepNodeId()), logicalSwitchName, physicalDevice, defaultVlanId));
LOG.info("creating mast mac entries for {} {}", logicalSwitchName, elanL2GwDevice.getHwvtepNodeId());
futures.add(elanL2GatewayMulticastUtils.handleMcastForElanL2GwDeviceAdd(logicalSwitchName, elanL2GwDevice));
-
- List<IpAddress> expectedPhyLocatorIps = new ArrayList<>();
- HwvtepRemoteMcastMacListener list = new HwvtepRemoteMcastMacListener(broker,
- elanUtils, logicalSwitchName, elanL2GwDevice, expectedPhyLocatorIps,
- () -> {
- LOG.info("adding remote ucast macs for {} {}", logicalSwitchName,
- elanL2GwDevice.getHwvtepNodeId());
- List<ListenableFuture<Void>> futures1 = new ArrayList<>();
- futures1.add(elanL2GatewayUtils.installElanMacsInL2GatewayDevice(
- logicalSwitchName, elanL2GwDevice));
- return futures1;
- });
-
+ futures.add(elanL2GatewayUtils.installElanMacsInL2GatewayDevice(
+ logicalSwitchName, elanL2GwDevice));
return futures;
}
package org.opendaylight.netvirt.elan.l2gw.listeners;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
import org.opendaylight.netvirt.elan.l2gw.utils.L2GatewayConnectionUtils;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
private final L2GatewayConnectionUtils l2GatewayConnectionUtils;
public L2GatewayConnectionListener(final DataBroker db, ElanUtils elanUtils) {
+ super(L2gatewayConnection.class, L2GatewayConnectionListener.class);
this.broker = db;
this.l2GatewayConnectionUtils = elanUtils.getL2GatewayConnectionUtils();
}
+ public void init() {
+ registerListener(LogicalDatastoreType.CONFIGURATION, broker);
+ }
+
@Override
protected void add(final InstanceIdentifier<L2gatewayConnection> identifier, final L2gatewayConnection input) {
LOG.trace("Adding L2gatewayConnection: {}", input);