@Beta public interface PiPipelineInterpreter extends HandlerBehaviour
Modifier and Type | Interface and Description |
---|---|
static class |
PiPipelineInterpreter.PiInterpreterException
Signals that an error was encountered while executing the interpreter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<PiMatchFieldId> |
mapCriterionType(Criterion.Type type)
Returns a PI match field ID that is equivalent to the given criterion type, if present.
|
java.util.Optional<PiTableId> |
mapFlowRuleTableId(int flowRuleTableId)
Returns a PI table ID equivalent to the given numeric table ID (as in
FlowRule.tableId() ). |
InboundPacket |
mapInboundPacket(PiPacketOperation packetOperation)
Returns an inbound packet equivalent to the given PI packet operation.
|
java.util.Collection<PiPacketOperation> |
mapOutboundPacket(OutboundPacket packet)
Returns a collection of PI packet operations equivalent to the given outbound packet instance.
|
java.util.Optional<Criterion.Type> |
mapPiMatchFieldId(PiMatchFieldId fieldId)
Returns the criterion type that is equivalent to the given PI match field ID, if present.
|
java.util.Optional<java.lang.Integer> |
mapPiTableId(PiTableId piTableId)
Returns an integer table ID equivalent to the given PI table ID.
|
java.util.Optional<PiCounterId> |
mapTableCounter(PiTableId piTableId)
Returns a PI direct counter ID for the given table to be used to to compute flow entry statistics, if present.
|
PiAction |
mapTreatment(TrafficTreatment treatment,
PiTableId piTableId)
Returns an action of a PI pipeline that is functionally equivalent to the given traffic treatment for the given
table.
|
handler, setHandler
java.util.Optional<PiMatchFieldId> mapCriterionType(Criterion.Type type)
type
- criterion typejava.util.Optional<Criterion.Type> mapPiMatchFieldId(PiMatchFieldId fieldId)
fieldId
- match field IDjava.util.Optional<PiTableId> mapFlowRuleTableId(int flowRuleTableId)
FlowRule.tableId()
). If not present, it means that the given integer table ID cannot be
mapped to any table of the pipeline model.flowRuleTableId
- a numeric table IDjava.util.Optional<java.lang.Integer> mapPiTableId(PiTableId piTableId)
piTableId
- PI table IDPiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiPipelineInterpreter.PiInterpreterException
treatment
- traffic treatmentpiTableId
- PI table IDPiPipelineInterpreter.PiInterpreterException
- if the treatment cannot be mapped to any PI actionjava.util.Optional<PiCounterId> mapTableCounter(PiTableId piTableId)
piTableId
- table IDjava.util.Collection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet) throws PiPipelineInterpreter.PiInterpreterException
packet
- outbound packetPiPipelineInterpreter.PiInterpreterException
- if the packet treatments cannot be executed by this pipelineInboundPacket mapInboundPacket(PiPacketOperation packetOperation) throws PiPipelineInterpreter.PiInterpreterException
packetOperation
- packet operationPiPipelineInterpreter.PiInterpreterException
- if the packet operation cannot be mapped to an inbound packet