Class DirectTunnelUtils


  • @Singleton
    public final class DirectTunnelUtils
    extends java.lang.Object
    • Field Detail

      • 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
    • 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)
      • 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.Map<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfdKey,​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,
                                           java.util.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)