Class DirectTunnelUtils
- java.lang.Object
-
- org.opendaylight.genius.itm.itmdirecttunnels.renderer.ovs.utilities.DirectTunnelUtils
-
@Singleton public final class DirectTunnelUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BFD_OP_STATE
static java.lang.String
BFD_STATE_UP
static java.lang.String
TUNNEL_OPTIONS_DESTINATION_PORT
static java.lang.String
TUNNEL_OPTIONS_EXTS
static java.lang.String
TUNNEL_OPTIONS_KEY
static java.lang.String
TUNNEL_OPTIONS_LOCAL_IP
static java.lang.String
TUNNEL_OPTIONS_NSHC1
static java.lang.String
TUNNEL_OPTIONS_NSHC2
static java.lang.String
TUNNEL_OPTIONS_NSHC3
static java.lang.String
TUNNEL_OPTIONS_NSHC4
static java.lang.String
TUNNEL_OPTIONS_NSI
static java.lang.String
TUNNEL_OPTIONS_NSP
static java.lang.String
TUNNEL_OPTIONS_REMOTE_IP
static java.lang.String
TUNNEL_OPTIONS_TOS
static java.lang.String
TUNNEL_OPTIONS_TOS_VALUE_INHERIT
static java.lang.String
TUNNEL_OPTIONS_VALUE_FLOW
static java.lang.String
TUNNEL_OPTIONS_VALUE_GPE
static java.lang.String
TUNNEL_OPTIONS_VALUE_GPE_DESTINATION_PORT
static java.util.function.Predicate<java.lang.String>
TUNNEL_PORT_PREDICATE
static com.google.common.collect.ImmutableMap<java.lang.Class<? extends TunnelTypeBase>,java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeBase>>
TUNNEL_TYPE_MAP
-
Constructor Summary
Constructors Constructor Description DirectTunnelUtils(IdManagerService idManagerService, IMdsalApiManager mdsalApiManager, EntityOwnershipUtils entityOwnershipUtils, ItmConfig itmConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTunnelEgressFlow(TypedWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String portNo, int dstId, java.lang.String interfaceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress dstIp)
void
addTunnelIngressFlow(TypedWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, long portNo, java.lang.String interfaceName, int ifIndex, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address ipAddress)
void
addTunnelPortToBridge(IfTunnel ifTunnel, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> bridgeIid, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface, java.lang.String portName)
int
allocateId(java.lang.String poolName, java.lang.String idKey)
static boolean
bfdMonitoringEnabled(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd> interfaceBfds)
static boolean
changeInBfdMonitoringDetected(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpOld, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpNew)
static TunnelOperStatus
convertInterfaceToTunnelOperState(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface.OperStatus opState)
static void
createBridgeTunnelEntryInConfigDS(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String childInterface)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnsTeps>
createDpnTepsInstanceIdentifier(org.opendaylight.yangtools.yang.common.Uint64 sourceDpnId)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint>
createTerminationPointInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey nodekey, java.lang.String portName)
void
deleteTunnelStateEntry(java.lang.String interfaceName)
static java.lang.String
generateOfPortName(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String tunnelType)
static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd>
getBfdParams(IfTunnel ifTunnel)
java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd>
getBfdParams(RemoteDpns remoteDpn)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeTunnelEntry>
getBridgeTunnelEntryIdentifier(OvsBridgeEntryKey bridgeEntryKey, OvsBridgeTunnelEntryKey bridgeInterfaceEntryKey)
static org.opendaylight.yangtools.yang.common.Uint64
getDpnFromNodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
org.opendaylight.yangtools.yang.common.Uint64
getDpnId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId datapathId)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeEntry>
getOvsBridgeEntryIdentifier(OvsBridgeEntryKey bridgeEntryKey)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeRefEntry>
getOvsBridgeRefEntryIdentifier(OvsBridgeRefEntryKey bridgeRefEntryKey)
static long
getPortNumberFromNodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
static boolean
ifBfdStatusNotEqual(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpOld, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpNew)
boolean
isEntityOwner()
@NonNull org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.Acquired
lockTunnel(java.lang.String tunnelName)
void
removeLportTagInterfaceMap(java.lang.String infName)
void
removeTunnelEgressFlow(TypedReadWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String interfaceName)
void
removeTunnelIngressFlow(TypedReadWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String interfaceName)
void
updateBfdConfiguration(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId, RemoteDpns remoteDpn, @NonNull com.google.common.base.Optional<OvsBridgeRefEntry> ovsBridgeRefEntry)
void
updateBfdParamtersForTerminationPoint(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> bridgeIid, RemoteDpns remoteDpn)
-
-
-
Field Detail
-
BFD_OP_STATE
public static final java.lang.String BFD_OP_STATE
- See Also:
- Constant Field Values
-
BFD_STATE_UP
public static final java.lang.String BFD_STATE_UP
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_KEY
public static final java.lang.String TUNNEL_OPTIONS_KEY
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_LOCAL_IP
public static final java.lang.String TUNNEL_OPTIONS_LOCAL_IP
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_REMOTE_IP
public static final java.lang.String TUNNEL_OPTIONS_REMOTE_IP
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_DESTINATION_PORT
public static final java.lang.String TUNNEL_OPTIONS_DESTINATION_PORT
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_TOS
public static final java.lang.String TUNNEL_OPTIONS_TOS
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_EXTS
public static final java.lang.String TUNNEL_OPTIONS_EXTS
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSI
public static final java.lang.String TUNNEL_OPTIONS_NSI
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSP
public static final java.lang.String TUNNEL_OPTIONS_NSP
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSHC1
public static final java.lang.String TUNNEL_OPTIONS_NSHC1
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSHC2
public static final java.lang.String TUNNEL_OPTIONS_NSHC2
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSHC3
public static final java.lang.String TUNNEL_OPTIONS_NSHC3
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_NSHC4
public static final java.lang.String TUNNEL_OPTIONS_NSHC4
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_VALUE_FLOW
public static final java.lang.String TUNNEL_OPTIONS_VALUE_FLOW
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_VALUE_GPE
public static final java.lang.String TUNNEL_OPTIONS_VALUE_GPE
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_VALUE_GPE_DESTINATION_PORT
public static final java.lang.String TUNNEL_OPTIONS_VALUE_GPE_DESTINATION_PORT
- See Also:
- Constant Field Values
-
TUNNEL_OPTIONS_TOS_VALUE_INHERIT
public static final java.lang.String TUNNEL_OPTIONS_TOS_VALUE_INHERIT
- See Also:
- Constant Field Values
-
TUNNEL_TYPE_MAP
public static final com.google.common.collect.ImmutableMap<java.lang.Class<? extends TunnelTypeBase>,java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeBase>> TUNNEL_TYPE_MAP
-
TUNNEL_PORT_PREDICATE
public static final java.util.function.Predicate<java.lang.String> TUNNEL_PORT_PREDICATE
-
-
Constructor Detail
-
DirectTunnelUtils
@Inject public DirectTunnelUtils(IdManagerService idManagerService, IMdsalApiManager mdsalApiManager, EntityOwnershipUtils entityOwnershipUtils, ItmConfig itmConfig)
-
-
Method Detail
-
lockTunnel
@CheckReturnValue public @NonNull org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.Acquired lockTunnel(java.lang.String tunnelName)
-
getDpnId
public org.opendaylight.yangtools.yang.common.Uint64 getDpnId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId datapathId)
-
getDpnFromNodeConnectorId
public static org.opendaylight.yangtools.yang.common.Uint64 getDpnFromNodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
-
getPortNumberFromNodeConnectorId
public static long getPortNumberFromNodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
-
convertInterfaceToTunnelOperState
public static TunnelOperStatus convertInterfaceToTunnelOperState(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface.OperStatus opState)
-
getBridgeTunnelEntryIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeTunnelEntry> getBridgeTunnelEntryIdentifier(OvsBridgeEntryKey bridgeEntryKey, OvsBridgeTunnelEntryKey bridgeInterfaceEntryKey)
-
getOvsBridgeRefEntryIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeRefEntry> getOvsBridgeRefEntryIdentifier(OvsBridgeRefEntryKey bridgeRefEntryKey)
-
createDpnTepsInstanceIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnsTeps> createDpnTepsInstanceIdentifier(org.opendaylight.yangtools.yang.common.Uint64 sourceDpnId)
-
getOvsBridgeEntryIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<OvsBridgeEntry> getOvsBridgeEntryIdentifier(OvsBridgeEntryKey bridgeEntryKey)
-
createTerminationPointInstanceIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint> createTerminationPointInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey nodekey, java.lang.String portName)
-
getBfdParams
public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd> getBfdParams(IfTunnel ifTunnel)
-
getBfdParams
public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd> getBfdParams(RemoteDpns remoteDpn)
-
bfdMonitoringEnabled
public static boolean bfdMonitoringEnabled(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd> interfaceBfds)
-
changeInBfdMonitoringDetected
public static boolean changeInBfdMonitoringDetected(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpOld, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpNew)
-
ifBfdStatusNotEqual
public static boolean ifBfdStatusNotEqual(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpOld, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation tpNew)
-
allocateId
public int allocateId(java.lang.String poolName, java.lang.String idKey) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, org.opendaylight.yangtools.yang.common.OperationFailedException
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
org.opendaylight.yangtools.yang.common.OperationFailedException
-
createBridgeTunnelEntryInConfigDS
public static void createBridgeTunnelEntryInConfigDS(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String childInterface)
-
addTunnelIngressFlow
public void addTunnelIngressFlow(TypedWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, long portNo, java.lang.String interfaceName, int ifIndex, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address ipAddress)
-
removeTunnelIngressFlow
public void removeTunnelIngressFlow(TypedReadWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String interfaceName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addTunnelEgressFlow
public void addTunnelEgressFlow(TypedWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String portNo, int dstId, java.lang.String interfaceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress dstIp)
-
removeTunnelEgressFlow
public void removeTunnelEgressFlow(TypedReadWriteTransaction<Datastore.Configuration> tx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String interfaceName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addTunnelPortToBridge
public void addTunnelPortToBridge(IfTunnel ifTunnel, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> bridgeIid, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface, java.lang.String portName)
-
removeLportTagInterfaceMap
public void removeLportTagInterfaceMap(java.lang.String infName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, org.opendaylight.yangtools.yang.common.OperationFailedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
org.opendaylight.yangtools.yang.common.OperationFailedException
-
deleteTunnelStateEntry
public void deleteTunnelStateEntry(java.lang.String interfaceName)
-
updateBfdConfiguration
public void updateBfdConfiguration(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId, RemoteDpns remoteDpn, @NonNull com.google.common.base.Optional<OvsBridgeRefEntry> ovsBridgeRefEntry)
-
updateBfdParamtersForTerminationPoint
public void updateBfdParamtersForTerminationPoint(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> bridgeIid, RemoteDpns remoteDpn)
-
isEntityOwner
public boolean isEntityOwner()
-
generateOfPortName
public static java.lang.String generateOfPortName(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String tunnelType)
-
-