import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata;
import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
import org.opendaylight.genius.mdsalutil.matches.MatchInPort;
+import org.opendaylight.infrautils.utils.concurrent.KeyedLocks;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
private static final TopologyId OVSDB_TOPOLOGY_ID = new TopologyId(new Uri("ovsdb:1"));
private static final long INVALID_ID = 0;
+ private final KeyedLocks<String> tunnelLocks = new KeyedLocks<>();
+
// To keep the mapping between Tunnel Types and Tunnel Interfaces
public static final ImmutableMap<Class<? extends TunnelTypeBase>,
this.mdsalApiManager = mdsalApiManager;
}
+ public KeyedLocks<String> getTunnelLocks() {
+ return tunnelLocks;
+ }
+
public BigInteger getDpnId(DatapathId datapathId) {
if (datapathId != null) {
String dpIdStr = datapathId.getValue().replace(":", "");
options.put(DirectTunnelUtils.TUNNEL_OPTIONS_TOS, DirectTunnelUtils.TUNNEL_OPTIONS_TOS_VALUE_INHERIT);
// Specific options for each type of tunnel
- if (ifTunnel.getTunnelInterfaceType().equals(TunnelTypeVxlanGpe.class)) {
+ if (TunnelTypeVxlanGpe.class.equals(ifTunnel.getTunnelInterfaceType())) {
options.put(DirectTunnelUtils.TUNNEL_OPTIONS_EXTS, DirectTunnelUtils.TUNNEL_OPTIONS_VALUE_GPE);
options.put(DirectTunnelUtils.TUNNEL_OPTIONS_NSI, DirectTunnelUtils.TUNNEL_OPTIONS_VALUE_FLOW);
options.put(DirectTunnelUtils.TUNNEL_OPTIONS_NSP, DirectTunnelUtils.TUNNEL_OPTIONS_VALUE_FLOW);