Class ElanItmUtils


  • @Singleton
    public class ElanItmUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ElanItmUtils​(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> buildItmEgressActions​(java.lang.String interfaceName, @Nullable java.lang.Long tunnelKey, boolean internal)
      Builds the list of actions to be taken when sending the packet over external port such as tunnel, physical port etc.
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> buildTunnelItmEgressActions​(java.lang.String tunnelIfaceName, java.lang.Long tunnelKey, boolean ineternal)
      Builds the list of actions to be taken when sending the packet over a VxLan Tunnel Interface, such as setting the network VNI in the tunnel_id field.
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalPortItmEgressAction​(java.lang.String interfaceName)
      Build the list of actions to be taken when sending the packet to external (physical) port.
      java.lang.String getExternalTunnelInterfaceName​(java.lang.String sourceNode, java.lang.String dstNode)
      Gets the external tunnel interface name.
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId, java.lang.String nexthopIP, long vni)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId torNode, long vni)
      Builds the list of actions to be taken when sending the packet over an external VxLan tunnel interface, such as stamping the VNI on the VxLAN header, setting the vlanId if it proceeds and output the packet over the right port.
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getInternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 sourceDpnId, org.opendaylight.yangtools.yang.common.Uint64 destinationDpnId, long tunnelKey)
      Builds the list of actions to be taken when sending the packet over an internal VxLAN tunnel interface, such as setting the serviceTag/segmentationID on the VNI field of the VxLAN header, setting the vlanId if it proceeds and output the packet over the right port.
      org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getSourceDpnTepIp​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId dstHwVtepNodeId)
      Gets the source dpn tep ip.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ElanItmUtils

        @Inject
        public ElanItmUtils​(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
                            org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                            org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService,
                            org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager)
    • Method Detail

      • getExternalTunnelItmEgressAction

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId,
                                                                                                                                                        org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId torNode,
                                                                                                                                                        long vni)
        Builds the list of actions to be taken when sending the packet over an external VxLan tunnel interface, such as stamping the VNI on the VxLAN header, setting the vlanId if it proceeds and output the packet over the right port.
        Parameters:
        srcDpnId - Dpn where the tunnelInterface is located
        torNode - NodeId of the ExternalDevice where the packet must be sent to.
        vni - Vni to be stamped on the VxLAN Header.
        Returns:
        the external itm egress action
      • getExternalTunnelItmEgressAction

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId,
                                                                                                                                                        java.lang.String nexthopIP,
                                                                                                                                                        long vni)
      • getInternalTunnelItmEgressAction

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getInternalTunnelItmEgressAction​(org.opendaylight.yangtools.yang.common.Uint64 sourceDpnId,
                                                                                                                                                        org.opendaylight.yangtools.yang.common.Uint64 destinationDpnId,
                                                                                                                                                        long tunnelKey)
        Builds the list of actions to be taken when sending the packet over an internal VxLAN tunnel interface, such as setting the serviceTag/segmentationID on the VNI field of the VxLAN header, setting the vlanId if it proceeds and output the packet over the right port.
        Parameters:
        sourceDpnId - Dpn where the tunnelInterface is located
        destinationDpnId - Dpn where the packet must be sent to. It is used here in order to select the right tunnel interface.
        tunnelKey - Tunnel key to be sent on the VxLAN header.
        Returns:
        the internal itm egress action
      • buildTunnelItmEgressActions

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> buildTunnelItmEgressActions​(java.lang.String tunnelIfaceName,
                                                                                                                                                   java.lang.Long tunnelKey,
                                                                                                                                                   boolean ineternal)
        Builds the list of actions to be taken when sending the packet over a VxLan Tunnel Interface, such as setting the network VNI in the tunnel_id field.
        Parameters:
        tunnelIfaceName - the tunnel iface name
        tunnelKey - the tunnel key
        Returns:
        the list
      • getExternalPortItmEgressAction

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getExternalPortItmEgressAction​(java.lang.String interfaceName)
        Build the list of actions to be taken when sending the packet to external (physical) port.
        Parameters:
        interfaceName - Interface name
        Returns:
        the external port itm egress actions
      • buildItmEgressActions

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> buildItmEgressActions​(java.lang.String interfaceName,
                                                                                                                                             @Nullable java.lang.Long tunnelKey,
                                                                                                                                             boolean internal)
        Builds the list of actions to be taken when sending the packet over external port such as tunnel, physical port etc.
        Parameters:
        interfaceName - the interface name
        tunnelKey - can be VNI for VxLAN tunnel interfaces, Gre Key for GRE tunnels, etc.
        Returns:
        the list
      • getSourceDpnTepIp

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getSourceDpnTepIp​(org.opendaylight.yangtools.yang.common.Uint64 srcDpnId,
                                                                                                                              org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId dstHwVtepNodeId)
        Gets the source dpn tep ip.
        Parameters:
        srcDpnId - the src dpn id
        dstHwVtepNodeId - the dst hw vtep node id
        Returns:
        the dpn tep ip
      • getExternalTunnelInterfaceName

        public java.lang.String getExternalTunnelInterfaceName​(java.lang.String sourceNode,
                                                               java.lang.String dstNode)
        Gets the external tunnel interface name.
        Parameters:
        sourceNode - the source node
        dstNode - the dst node
        Returns:
        the external tunnel interface name