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(TypedWriteTransaction<Datastore.Operational> tx,
String interfaceName,
BoundServicesState interfaceBoundServicesState) |
static com.google.common.util.concurrent.ListenableFuture<Void> |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
String interfaceName,
int ifIndex,
long groupId) |
static com.google.common.util.concurrent.ListenableFuture<Void> |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface interfaceInfo,
String portNo,
String interfaceName,
int ifIndex) |
static com.google.common.util.concurrent.ListenableFuture<Void> |
bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner,
String interfaceName,
List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions) |
static void |
bindDefaultEgressDispatcherService(TypedWriteTransaction<Datastore.Configuration> tx,
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(TypedWriteTransaction<Datastore.Configuration> tx,
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.ReadTransaction tx,
String interfaceName,
Class<? extends ServiceModeBase> serviceMode) |
static BoundServicesState |
getBoundServicesState(TypedReadTransaction<Datastore.Operational> tx,
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(TypedReadTransaction<Datastore.Configuration> tx,
String interfaceName,
Class<? extends ServiceModeBase> serviceMode) |
static void |
installEgressDispatcherFlows(BigInteger dpId,
BoundServices boundService,
String interfaceName,
TypedWriteTransaction<Datastore.Configuration> tx,
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,
TypedWriteTransaction<Datastore.Configuration> tx,
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,
TypedWriteTransaction<Datastore.Configuration> 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,
TypedWriteTransaction<Datastore.Configuration> tx,
List<MatchInfo> matches,
int lportTag,
short tableId) |
static void |
installLPortDispatcherFlow(BigInteger dpId,
BoundServices boundService,
String interfaceName,
TypedWriteTransaction<Datastore.Configuration> tx,
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(TypedWriteTransaction<Datastore.Operational> tx,
String interfaceName,
Class<? extends ServiceModeBase> serviceMode) |
static void |
removeEgressDispatcherFlows(BigInteger dpId,
String iface,
TypedWriteTransaction<Datastore.Configuration> writeTransaction,
short currentServiceIndex) |
static void |
removeEgressSplitHorizonDispatcherFlow(BigInteger dpId,
String iface,
TypedWriteTransaction<Datastore.Configuration> 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,
TypedWriteTransaction<Datastore.Configuration> writeTransaction) |
static void |
removeLPortDispatcherFlow(BigInteger dpId,
String iface,
BoundServices boundServicesOld,
TypedWriteTransaction<Datastore.Configuration> 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(TypedReadTransaction<Datastore.Configuration> tx, String interfaceName, Class<? extends ServiceModeBase> serviceMode) throws ExecutionException, InterruptedException
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, TypedWriteTransaction<Datastore.Configuration> tx, 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, TypedWriteTransaction<Datastore.Configuration> writeTransaction)
public static void installLPortDispatcherFlow(BigInteger dpId, BoundServices boundService, String interfaceName, TypedWriteTransaction<Datastore.Configuration> tx, int interfaceTag, short currentServiceIndex, short nextServiceIndex)
public static void installEgressDispatcherFlows(BigInteger dpId, BoundServices boundService, String interfaceName, TypedWriteTransaction<Datastore.Configuration> tx, 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, TypedWriteTransaction<Datastore.Configuration> tx, 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 com.google.common.util.concurrent.ListenableFuture<Void> bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, 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(TypedWriteTransaction<Datastore.Configuration> tx, 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 com.google.common.util.concurrent.ListenableFuture<Void> bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, 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 com.google.common.util.concurrent.ListenableFuture<Void> bindDefaultEgressDispatcherService(ManagedNewTransactionRunner txRunner, String interfaceName, List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
public static void bindDefaultEgressDispatcherService(TypedWriteTransaction<Datastore.Configuration> tx, 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, TypedWriteTransaction<Datastore.Configuration> writeTransaction)
public static void removeLPortDispatcherFlow(BigInteger dpId, String iface, BoundServices boundServicesOld, TypedWriteTransaction<Datastore.Configuration> writeTransaction, short currentServiceIndex)
public static void removeEgressDispatcherFlows(BigInteger dpId, String iface, TypedWriteTransaction<Datastore.Configuration> writeTransaction, short currentServiceIndex)
public static void removeEgressSplitHorizonDispatcherFlow(BigInteger dpId, String iface, TypedWriteTransaction<Datastore.Configuration> 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.ReadTransaction tx, String interfaceName, Class<? extends ServiceModeBase> serviceMode) throws org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
public static BoundServicesState getBoundServicesState(TypedReadTransaction<Datastore.Operational> tx, String interfaceName, Class<? extends ServiceModeBase> serviceMode) throws ExecutionException, InterruptedException
public static void addBoundServicesState(TypedWriteTransaction<Datastore.Operational> tx, String interfaceName, BoundServicesState interfaceBoundServicesState)
public static void removeBoundServicesState(TypedWriteTransaction<Datastore.Operational> tx, String interfaceName, Class<? extends ServiceModeBase> serviceMode)
public static boolean isInterfaceTypeBasedServiceBinding(String interfaceName)
Copyright © 2019 OpenDaylight. All rights reserved.