public final class FlowBasedServicesUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FlowBasedServicesUtils.ServiceMode |
Modifier and Type | Field and Description |
---|---|
static Collection<String> |
INTERFACE_TYPE_BASED_SERVICE_BINDING_KEYWORDS |
static com.google.common.collect.ImmutableBiMap<FlowBasedServicesUtils.ServiceMode,Class<? extends ServiceModeBase>> |
SERVICE_MODE_MAP |
Modifier and Type | Method and Description |
---|---|
static void |
addBoundServicesState(List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
ManagedNewTransactionRunner txRunner,
String interfaceName,
BoundServicesState interfaceBoundServicesState) |
static void |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
String interfaceName,
int ifIndex,
long groupId) |
static void |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
String portNo,
String interfaceName,
int ifIndex) |
static void |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
String interfaceName,
List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions) |
static BoundServicesState |
buildBoundServicesState(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState,
Class<? extends ServiceModeBase> serviceMode) |
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> |
buildDefaultServiceId(String interfaceName) |
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> |
buildServiceId(String interfaceName,
short serviceIndex) |
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> |
buildServiceId(String interfaceName,
short serviceIndex,
Class<? extends ServiceModeBase> serviceMode) |
static BoundServices |
getBoundServices(String serviceName,
short servicePriority,
int flowPriority,
BigInteger cookie,
List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions) |
static BoundServicesState |
getBoundServicesState(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
String interfaceName,
Class<? extends ServiceModeBase> serviceMode) |
static BigInteger |
getDpnIdFromInterface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState) |
static String |
getFlowRef(short tableId,
BigInteger dpnId,
String infName) |
static BoundServices[] |
getHighAndLowPriorityService(List<BoundServices> serviceInfos,
BoundServices currentServiceInfo)
This utility method returns an array of ServiceInfo in which index 0 will
have the immediate lower priority service and index 1 will have the
immediate higher priority service among the list of existing
serviceInfos.
|
static BoundServices |
getHighestPriorityService(List<BoundServices> serviceInfos) |
static List<MatchInfo> |
getMatchInfoForDispatcherTable(int interfaceTag,
short servicePriority) |
static List<MatchInfoBase> |
getMatchInfoForEgressDispatcherTable(int interfaceTag,
short serviceIndex) |
static List<MatchInfo> |
getMatchInfoForTunnelPortAtIngressTable(BigInteger dpId,
long portNo) |
static List<MatchInfo> |
getMatchInfoForVlanPortAtIngressTable(BigInteger dpId,
long portNo,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface) |
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.NodeConnectorId |
getNodeConnectorIdFromInterface(String interfaceName,
InterfaceManagerCommonUtils interfaceManagerCommonUtils) |
static ServicesInfo |
getServicesInfoForInterface(String interfaceName,
Class<? extends ServiceModeBase> serviceMode,
org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker) |
static void |
installEgressDispatcherFlows(BigInteger dpId,
BoundServices boundService,
String interfaceName,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
int interfaceTag,
short currentServiceIndex,
short nextServiceIndex,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface) |
static void |
installEgressDispatcherSplitHorizonFlow(BigInteger dpId,
BoundServices boundService,
String interfaceName,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
int interfaceTag,
short currentServiceIndex,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface) |
static void |
installFlow(BigInteger dpId,
org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction) |
static void |
installInterfaceIngressFlow(BigInteger dpId,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface,
BoundServices boundServiceNew,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
List<MatchInfo> matches,
int lportTag,
short tableId) |
static void |
installLPortDispatcherFlow(BigInteger dpId,
BoundServices boundService,
String interfaceName,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
int interfaceTag,
short currentServiceIndex,
short nextServiceIndex) |
static void |
installLportIngressFlow(BigInteger dpId,
long portNo,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface,
List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
ManagedNewTransactionRunner txRunner,
int lportTag) |
static boolean |
isInterfaceTypeBasedServiceBinding(String interfaceName) |
static void |
removeBoundServicesState(List<com.google.common.util.concurrent.ListenableFuture<Void>> futures,
ManagedNewTransactionRunner txRunner,
String interfaceName,
Class<? extends ServiceModeBase> serviceMode) |
static void |
removeEgressDispatcherFlows(BigInteger dpId,
String iface,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
short currentServiceIndex) |
static void |
removeEgressSplitHorizonDispatcherFlow(BigInteger dpId,
String iface,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction) |
static void |
removeIngressFlow(String interfaceName,
BigInteger dpId,
ManagedNewTransactionRunner txRunner,
List<com.google.common.util.concurrent.ListenableFuture<Void>> futures) |
static void |
removeIngressFlow(String name,
BoundServices serviceOld,
BigInteger dpId,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction) |
static void |
removeLPortDispatcherFlow(BigInteger dpId,
String iface,
BoundServices boundServicesOld,
org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction,
short currentServiceIndex) |
public static final com.google.common.collect.ImmutableBiMap<FlowBasedServicesUtils.ServiceMode,Class<? extends ServiceModeBase>> SERVICE_MODE_MAP
public static final Collection<String> INTERFACE_TYPE_BASED_SERVICE_BINDING_KEYWORDS
public static ServicesInfo getServicesInfoForInterface(String interfaceName, Class<? extends ServiceModeBase> serviceMode, org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker)
public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId getNodeConnectorIdFromInterface(String interfaceName, InterfaceManagerCommonUtils interfaceManagerCommonUtils)
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)
@Nullable public static BigInteger getDpnIdFromInterface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState)
public static List<MatchInfo> getMatchInfoForVlanPortAtIngressTable(BigInteger dpId, long portNo, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface)
@Nonnull public static List<MatchInfo> getMatchInfoForTunnelPortAtIngressTable(BigInteger dpId, long portNo)
public static List<MatchInfo> getMatchInfoForDispatcherTable(int interfaceTag, short servicePriority)
public static List<MatchInfoBase> getMatchInfoForEgressDispatcherTable(int interfaceTag, short serviceIndex)
public static void installInterfaceIngressFlow(BigInteger dpId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface, BoundServices boundServiceNew, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, List<MatchInfo> matches, int lportTag, short tableId)
public static void installFlow(BigInteger dpId, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction)
public static void installLPortDispatcherFlow(BigInteger dpId, BoundServices boundService, String interfaceName, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, int interfaceTag, short currentServiceIndex, short nextServiceIndex)
public static void installEgressDispatcherFlows(BigInteger dpId, BoundServices boundService, String interfaceName, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, int interfaceTag, short currentServiceIndex, short nextServiceIndex, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface)
public static void installEgressDispatcherSplitHorizonFlow(BigInteger dpId, BoundServices boundService, String interfaceName, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, int interfaceTag, short currentServiceIndex, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface)
public static BoundServices getBoundServices(String serviceName, short servicePriority, int flowPriority, BigInteger cookie, List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> buildServiceId(String interfaceName, short serviceIndex)
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> buildServiceId(String interfaceName, short serviceIndex, Class<? extends ServiceModeBase> serviceMode)
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<BoundServices> buildDefaultServiceId(String interfaceName)
public static void bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo, String portNo, String interfaceName, int ifIndex)
public static void bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo, String interfaceName, int ifIndex, long groupId)
public static void bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, String interfaceName, List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
public static void removeIngressFlow(String interfaceName, BigInteger dpId, ManagedNewTransactionRunner txRunner, List<com.google.common.util.concurrent.ListenableFuture<Void>> futures)
public static void removeIngressFlow(String name, BoundServices serviceOld, BigInteger dpId, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction)
public static void removeLPortDispatcherFlow(BigInteger dpId, String iface, BoundServices boundServicesOld, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, short currentServiceIndex)
public static void removeEgressDispatcherFlows(BigInteger dpId, String iface, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction, short currentServiceIndex)
public static void removeEgressSplitHorizonDispatcherFlow(BigInteger dpId, String iface, org.opendaylight.controller.md.sal.binding.api.WriteTransaction writeTransaction)
public static String getFlowRef(short tableId, BigInteger dpnId, String infName)
public static BoundServices[] getHighAndLowPriorityService(List<BoundServices> serviceInfos, BoundServices currentServiceInfo)
serviceInfos
- list of services boundcurrentServiceInfo
- current service boundpublic static BoundServices getHighestPriorityService(List<BoundServices> serviceInfos)
public static void installLportIngressFlow(BigInteger dpId, long portNo, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface, List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, ManagedNewTransactionRunner txRunner, int lportTag)
public static BoundServicesState buildBoundServicesState(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState, Class<? extends ServiceModeBase> serviceMode)
public static BoundServicesState getBoundServicesState(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, String interfaceName, Class<? extends ServiceModeBase> serviceMode)
public static void addBoundServicesState(List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, ManagedNewTransactionRunner txRunner, String interfaceName, BoundServicesState interfaceBoundServicesState)
public static void removeBoundServicesState(List<com.google.common.util.concurrent.ListenableFuture<Void>> futures, ManagedNewTransactionRunner txRunner, String interfaceName, Class<? extends ServiceModeBase> serviceMode)
public static boolean isInterfaceTypeBasedServiceBinding(String interfaceName)
Copyright © 2019 OpenDaylight. All rights reserved.