Package org.onosproject.net.pi.model
Interface PiTableModel
-
@Beta public interface PiTableModel
Model of a match+action table in a protocol-independent pipeline.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<PiActionModel>
action(PiActionId actionId)
Returns the action model associated with the given ID, if present.PiActionProfileModel
actionProfile()
Returns the model of the action profile that implements this table.java.util.Collection<PiActionModel>
actions()
Returns the actions supported by this table.java.util.Optional<PiActionModel>
constDefaultAction()
Returns the model of the constant default action associated with this table, if any.java.util.Collection<PiCounterModel>
counters()
Returns a collection of direct counters associated to this table.PiTableId
id()
Returns the ID of this table.boolean
isConstantTable()
Returns true if the table is populated with static entries that cannot be modified by the control plane at runtime.java.util.Optional<PiMatchFieldModel>
matchField(PiMatchFieldId matchFieldId)
Returns the match field model associated with the given ID, if present.java.util.Collection<PiMatchFieldModel>
matchFields()
Returns the collection of match fields supported by this table.long
maxSize()
Returns the maximum number of entries supported by this table.java.util.Collection<PiMeterModel>
meters()
Returns a collection of direct meters associated to this table.boolean
supportsAging()
Returns true if this table supports aging, false otherwise.PiTableType
tableType()
Returns the type of this table.
-
-
-
Method Detail
-
id
PiTableId id()
Returns the ID of this table.- Returns:
- a string value
-
tableType
PiTableType tableType()
Returns the type of this table.- Returns:
- table type
-
actionProfile
PiActionProfileModel actionProfile()
Returns the model of the action profile that implements this table. Meaningful if this table is of typePiTableType.INDIRECT
, otherwise returns null.- Returns:
- action profile ID
-
maxSize
long maxSize()
Returns the maximum number of entries supported by this table.- Returns:
- an integer value
-
counters
java.util.Collection<PiCounterModel> counters()
Returns a collection of direct counters associated to this table.- Returns:
- collection of direct counters
-
meters
java.util.Collection<PiMeterModel> meters()
Returns a collection of direct meters associated to this table.- Returns:
- collection of direct meters
-
supportsAging
boolean supportsAging()
Returns true if this table supports aging, false otherwise.- Returns:
- a boolean value
-
matchFields
java.util.Collection<PiMatchFieldModel> matchFields()
Returns the collection of match fields supported by this table.- Returns:
- a collection of match field models
-
actions
java.util.Collection<PiActionModel> actions()
Returns the actions supported by this table.- Returns:
- a collection of action models
-
constDefaultAction
java.util.Optional<PiActionModel> constDefaultAction()
Returns the model of the constant default action associated with this table, if any.- Returns:
- optional default action model
-
isConstantTable
boolean isConstantTable()
Returns true if the table is populated with static entries that cannot be modified by the control plane at runtime.- Returns:
- true if table is populated with static entries, false otherwise
-
action
java.util.Optional<PiActionModel> action(PiActionId actionId)
Returns the action model associated with the given ID, if present. If not present, it means that this table does not support such an action.- Parameters:
actionId
- action ID- Returns:
- optional action model
-
matchField
java.util.Optional<PiMatchFieldModel> matchField(PiMatchFieldId matchFieldId)
Returns the match field model associated with the given ID, if present. If not present, it means that this table does not support such a match field.- Parameters:
matchFieldId
- match field ID- Returns:
- optional match field model
-
-