Class IfmUtil


  • public final class IfmUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void addEgressActionInfosForInterface​(int ifIndex, int actionKeyStart, java.util.List<ActionInfo> result)  
      static java.lang.Integer allocateId​(IdManagerService idManager, java.lang.String poolName, java.lang.String idKey)  
      static void bindService​(TypedWriteTransaction<Datastore.Configuration> tx, java.lang.String interfaceName, BoundServices serviceInfo, java.lang.Class<? extends ServiceModeBase> serviceMode)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> buildBoundServicesIId​(short servicePriority, java.lang.String interfaceName, java.lang.Class<? extends ServiceModeBase> serviceMode)  
      static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId buildDpnNodeId​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> buildId​(java.lang.String interfaceName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> buildStateInterfaceId​(java.lang.String interfaceName)  
      static org.opendaylight.yangtools.yang.common.Uint64 fillPortNumberToMac​(long portNumber)  
      static java.lang.String generateMacAddress​(long portNo)  
      static org.opendaylight.yangtools.yang.common.Uint64 getDeadBeefBytesForMac()  
      static org.opendaylight.yangtools.yang.common.Uint64 getDpnFromInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState)  
      static org.opendaylight.yangtools.yang.common.Uint64 getDpnFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)  
      static org.opendaylight.yangtools.yang.common.Uint64 getDpnId​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId datapathId)  
      static java.lang.String getDpnStringFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)  
      static java.util.List<ActionInfo> getEgressActionInfosForInterface​(java.lang.String interfaceName, int actionKeyStart, InterfaceManagerCommonUtils interfaceUtils, java.lang.Boolean isDefaultEgress)  
      static java.util.List<ActionInfo> getEgressActionInfosForInterface​(java.lang.String interfaceName, java.lang.Long tunnelKey, int actionKeyStart, InterfaceManagerCommonUtils interfaceUtils, java.lang.Boolean isDefaultEgress)
      Returns a list of Actions to be taken when sending a packet over an interface.
      static java.util.List<ActionInfo> getEgressActionInfosForInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo, java.lang.String portNo, InterfaceInfo.InterfaceType ifaceType, java.lang.Long tunnelKey, int actionKeyStart, boolean isDefaultEgress, int ifIndex, long groupId)
      Returns the list of egress actions for a given interface.
      static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getEgressActionsForInterface​(java.lang.String interfaceName, java.lang.Long tunnelKey, java.lang.Integer actionKey, InterfaceManagerCommonUtils interfaceUtils, java.lang.Boolean isDefaultEgress)  
      static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getEgressInstructionsForInterface​(java.lang.String interfaceName, java.lang.Long tunnelKey, InterfaceManagerCommonUtils interfaceUtils, java.lang.Boolean isDefaultEgress)  
      static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getEgressInstructionsForInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo, java.lang.String portNo, java.lang.Long tunnelKey, boolean isDefaultEgress, int ifIndex, long groupId)  
      static long getGroupId​(int ifIndex, InterfaceInfo.InterfaceType infType)  
      static InterfaceInfo.InterfaceType getInterfaceType​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface)  
      static long getLogicalTunnelSelectGroupId​(int lportTag)  
      static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId getNodeConnectorIdFromInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState)  
      static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId getNodeIdFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId ncId)  
      static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress getPhyAddress​(long portNo, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector flowCapableNodeConnector)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdPool> getPoolId​(java.lang.String poolName)  
      static java.lang.String getPortNoFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)  
      static java.lang.Long getPortNumberFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)  
      static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey getStateInterfaceKeyFromName​(java.lang.String name)  
      static VlanInterfaceInfo getVlanInterfaceInfo​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface, org.opendaylight.yangtools.yang.common.Uint64 dpId)  
      static org.opendaylight.yangtools.yang.common.Uint64[] mergeOpenflowMetadataWriteInstructions​(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)  
      static <T extends org.opendaylight.yangtools.yang.binding.DataObject>
      com.google.common.base.Optional<T>
      read​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path, org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
      static void releaseId​(IdManagerService idManager, java.lang.String poolName, java.lang.String idKey)  
      static void unbindService​(ManagedNewTransactionRunner txRunner, org.opendaylight.infrautils.jobcoordinator.JobCoordinator coordinator, java.lang.String interfaceName, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> boundServicesInstanceIdentifier)  
      static void unbindService​(TypedWriteTransaction<Datastore.Configuration> tx, java.lang.String interfaceName, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> boundServicesInstanceIdentifier)  
      static void updateInterfaceParentRef​(TypedWriteTransaction<Datastore.Configuration> tx, java.lang.String interfaceName, java.lang.String parentInterface)  
      • Methods inherited from class java.lang.Object

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

      • getDpnFromNodeConnectorId

        public static org.opendaylight.yangtools.yang.common.Uint64 getDpnFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
      • getDpnStringFromNodeConnectorId

        public static java.lang.String getDpnStringFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
      • getDpnFromInterface

        public static org.opendaylight.yangtools.yang.common.Uint64 getDpnFromInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState)
      • getPortNoFromNodeConnectorId

        public static java.lang.String getPortNoFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
      • getPortNumberFromNodeConnectorId

        public static java.lang.Long getPortNumberFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId portId)
      • buildDpnNodeId

        public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId buildDpnNodeId​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • buildId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> buildId​(java.lang.String interfaceName)
      • buildStateInterfaceId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> buildStateInterfaceId​(java.lang.String interfaceName)
      • getStateInterfaceKeyFromName

        public static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey getStateInterfaceKeyFromName​(java.lang.String name)
      • getPoolId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IdPool> getPoolId​(java.lang.String poolName)
      • read

        @Deprecated
        public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.base.Optional<T> read​(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType,
                                                                                                                             org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
                                                                                                                             org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
        Synchronous blocking read from data store.
      • getEgressActionsForInterface

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getEgressActionsForInterface​(java.lang.String interfaceName,
                                                                                                                                                           java.lang.Long tunnelKey,
                                                                                                                                                           java.lang.Integer actionKey,
                                                                                                                                                           InterfaceManagerCommonUtils interfaceUtils,
                                                                                                                                                           java.lang.Boolean isDefaultEgress)
      • getEgressInstructionsForInterface

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getEgressInstructionsForInterface​(java.lang.String interfaceName,
                                                                                                                                                                        java.lang.Long tunnelKey,
                                                                                                                                                                        InterfaceManagerCommonUtils interfaceUtils,
                                                                                                                                                                        java.lang.Boolean isDefaultEgress)
      • getEgressInstructionsForInterface

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getEgressInstructionsForInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
                                                                                                                                                                        java.lang.String portNo,
                                                                                                                                                                        java.lang.Long tunnelKey,
                                                                                                                                                                        boolean isDefaultEgress,
                                                                                                                                                                        int ifIndex,
                                                                                                                                                                        long groupId)
      • getEgressActionInfosForInterface

        public static java.util.List<ActionInfo> getEgressActionInfosForInterface​(java.lang.String interfaceName,
                                                                                  int actionKeyStart,
                                                                                  InterfaceManagerCommonUtils interfaceUtils,
                                                                                  java.lang.Boolean isDefaultEgress)
      • getEgressActionInfosForInterface

        public static java.util.List<ActionInfo> getEgressActionInfosForInterface​(java.lang.String interfaceName,
                                                                                  java.lang.Long tunnelKey,
                                                                                  int actionKeyStart,
                                                                                  InterfaceManagerCommonUtils interfaceUtils,
                                                                                  java.lang.Boolean isDefaultEgress)
        Returns a list of Actions to be taken when sending a packet over an interface.
        Parameters:
        interfaceName - name of the interface
        tunnelKey - Optional.
        actionKeyStart - action key
        interfaceUtils - InterfaceManagerCommonUtils
        Returns:
        list of actions
      • getEgressActionInfosForInterface

        public static java.util.List<ActionInfo> getEgressActionInfosForInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
                                                                                  java.lang.String portNo,
                                                                                  InterfaceInfo.InterfaceType ifaceType,
                                                                                  java.lang.Long tunnelKey,
                                                                                  int actionKeyStart,
                                                                                  boolean isDefaultEgress,
                                                                                  int ifIndex,
                                                                                  long groupId)
        Returns the list of egress actions for a given interface.
        Parameters:
        interfaceInfo - the interface to look up
        portNo - port number
        ifaceType - the type of the interface
        tunnelKey - the tunnel key
        actionKeyStart - the start for the first key assigned for the new actions
        isDefaultEgress - if it is the default egress
        ifIndex - interface index
        groupId - group Id
        Returns:
        list of actions for the interface
      • addEgressActionInfosForInterface

        public static void addEgressActionInfosForInterface​(int ifIndex,
                                                            int actionKeyStart,
                                                            java.util.List<ActionInfo> result)
      • getNodeIdFromNodeConnectorId

        public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId getNodeIdFromNodeConnectorId​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId ncId)
      • mergeOpenflowMetadataWriteInstructions

        public static org.opendaylight.yangtools.yang.common.Uint64[] mergeOpenflowMetadataWriteInstructions​(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
      • allocateId

        public static java.lang.Integer allocateId​(IdManagerService idManager,
                                                   java.lang.String poolName,
                                                   java.lang.String idKey)
      • releaseId

        public static void releaseId​(IdManagerService idManager,
                                     java.lang.String poolName,
                                     java.lang.String idKey)
      • getDpnId

        public static org.opendaylight.yangtools.yang.common.Uint64 getDpnId​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId datapathId)
      • getNodeConnectorIdFromInterface

        public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId getNodeConnectorIdFromInterface​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState)
      • getInterfaceType

        public static InterfaceInfo.InterfaceType getInterfaceType​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface)
      • getVlanInterfaceInfo

        public static VlanInterfaceInfo getVlanInterfaceInfo​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface,
                                                             org.opendaylight.yangtools.yang.common.Uint64 dpId)
      • getDeadBeefBytesForMac

        public static org.opendaylight.yangtools.yang.common.Uint64 getDeadBeefBytesForMac()
      • fillPortNumberToMac

        public static org.opendaylight.yangtools.yang.common.Uint64 fillPortNumberToMac​(long portNumber)
      • generateMacAddress

        public static java.lang.String generateMacAddress​(long portNo)
      • getPhyAddress

        public static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress getPhyAddress​(long portNo,
                                                                                                                                   org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector flowCapableNodeConnector)
      • buildBoundServicesIId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> buildBoundServicesIId​(short servicePriority,
                                                                                                                      java.lang.String interfaceName,
                                                                                                                      java.lang.Class<? extends ServiceModeBase> serviceMode)
      • unbindService

        public static void unbindService​(ManagedNewTransactionRunner txRunner,
                                         org.opendaylight.infrautils.jobcoordinator.JobCoordinator coordinator,
                                         java.lang.String interfaceName,
                                         org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> boundServicesInstanceIdentifier)
      • getLogicalTunnelSelectGroupId

        public static long getLogicalTunnelSelectGroupId​(int lportTag)