@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 |
---|---|
default Optional<PiAction> |
getOriginalDefaultAction(PiTableId tableId)
If the given table allows for mutable default actions, this method
returns an action instance to be used when ONOS tries to remove a
different default action previously set.
|
Optional<PiMatchFieldId> |
mapCriterionType(Criterion.Type type)
Returns a PI match field ID that is equivalent to the given criterion
type, if present.
|
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,
DeviceId deviceId)
Returns an inbound packet equivalent to the given PI packet-in operation
for the given device.
|
default Optional<Integer> |
mapLogicalPortNumber(PortNumber port)
Maps the given logical port number to the data plane port ID (integer)
identifying the same port for this pipeconf, if such mapping is
possible.
|
Collection<PiPacketOperation> |
mapOutboundPacket(OutboundPacket packet)
Returns a collection of PI packet operations equivalent to the given
outbound packet instance.
|
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
Optional<PiMatchFieldId> mapCriterionType(Criterion.Type type)
type
- criterion typeOptional<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 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 actionCollection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet) throws PiPipelineInterpreter.PiInterpreterException
packet
- outbound packetPiPipelineInterpreter.PiInterpreterException
- if the packet treatments cannot be
executed by this pipelineInboundPacket mapInboundPacket(PiPacketOperation packetOperation, DeviceId deviceId) throws PiPipelineInterpreter.PiInterpreterException
packetOperation
- packet operationdeviceId
- ID of the device that originated the packet-inPiPipelineInterpreter.PiInterpreterException
- if the packet operation cannot be mapped
to an inbound packetdefault Optional<Integer> mapLogicalPortNumber(PortNumber port)
port
- port numberdefault Optional<PiAction> getOriginalDefaultAction(PiTableId tableId)
tableId
- table ID