public final class FlowActionUtils extends Object
FlowActionUtils class is a collection of utility class methods for
flow action handling.
Note that this class assumes that:
| Modifier and Type | Method and Description |
|---|---|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> |
getActions(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.InstructionList insts,
Comparator<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Ordered> comp)
Return the action list configured in the given flow instructions.
|
static L2Host |
getDestinationHost(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress mac,
int vlan)
Return the destination host configured in the given action list.
|
static String |
getOutputPort(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions)
Return the output port configured in the given action list.
|
static List<VtnFlowAction> |
toVtnFlowActions(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions,
Comparator<? super org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> comp,
Short ipproto)
Convert the given MD-SAL action list into a list of
VtnFlowAction instances. |
public static String getOutputPort(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions)
actions - A list of MD-SAL actions.null if not found.public static L2Host getDestinationHost(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress mac, int vlan)
actions - A list of MD-SAL actions.mac - The destination MAC address specified by the ingress
flow entry.vlan - The VLAN ID specified by the ingress flow entry.L2Host instance if found.
null if not found.public static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getActions(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.InstructionList insts, Comparator<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Ordered> comp)
Note that this method returns unmodifiable list.
insts - An InstructionList instance.comp - Comparator for MD-SAL actions.
If null is specified, this method returns
unsorted list.Action instances.public static List<VtnFlowAction> toVtnFlowActions(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions, Comparator<? super org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> comp, Short ipproto) throws RpcException
VtnFlowAction instances.actions - A list of Action instances.comp - A comparator for the given list.ipproto - An IP protocol number configured in the flow match.VtnFlowAction instances.RpcException - Failed to convert the given instance.Copyright © 2018 OpenDaylight. All rights reserved.