public class LinkCollectionCompiler<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
LinkCollectionCompiler.ForwardingInstructions
Helper class to encapsulate treatment and selector
in an unique abstraction.
|
| Constructor and Description |
|---|
LinkCollectionCompiler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computePorts(org.onosproject.net.intent.LinkCollectionIntent intent,
com.google.common.collect.SetMultimap<org.onosproject.net.DeviceId,org.onosproject.net.PortNumber> inputPorts,
com.google.common.collect.SetMultimap<org.onosproject.net.DeviceId,org.onosproject.net.PortNumber> outputPorts)
Helper method to compute input and output ports
for each device crossed in the path.
|
protected LinkCollectionCompiler.ForwardingInstructions |
createForwardingInstruction(Optional<org.onosproject.net.intent.constraint.EncapsulationConstraint> encapConstraint,
org.onosproject.net.intent.LinkCollectionIntent intent,
org.onosproject.net.PortNumber inPort,
Set<org.onosproject.net.PortNumber> outPorts,
org.onosproject.net.DeviceId deviceId,
Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> labels)
Helper method to handle the different scenario (not encap, single hop, encap).
|
protected LinkCollectionCompiler.ForwardingInstructions |
createForwardingInstructions(org.onosproject.net.intent.LinkCollectionIntent intent,
org.onosproject.net.PortNumber inPort,
org.onosproject.net.DeviceId deviceId,
Set<org.onosproject.net.PortNumber> outPorts)
Computes treatment and selector which will be used
in the flow representation (Rule, Objective).
|
protected LinkCollectionCompiler.ForwardingInstructions |
createForwardingInstructions(org.onosproject.net.intent.LinkCollectionIntent intent,
org.onosproject.net.PortNumber inPort,
org.onlab.util.Identifier<?> inLabel,
org.onosproject.net.DeviceId deviceId,
Set<org.onosproject.net.PortNumber> outPorts,
Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> outLabels,
org.onosproject.net.EncapsulationType type)
Computes treatment and selector which will be used
in the flow representation (Rule, Objective).
|
protected List<T> |
createRules(org.onosproject.net.intent.LinkCollectionIntent intent,
org.onosproject.net.DeviceId deviceId,
Set<org.onosproject.net.PortNumber> inPorts,
Set<org.onosproject.net.PortNumber> outPorts,
Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> labels)
Creates the flows representations.
|
protected Optional<org.onosproject.net.intent.constraint.EncapsulationConstraint> |
getIntentEncapConstraint(org.onosproject.net.intent.LinkCollectionIntent intent)
Retrieves the encapsulation constraint from the link collection intent.
|
protected List<T> createRules(org.onosproject.net.intent.LinkCollectionIntent intent, org.onosproject.net.DeviceId deviceId, Set<org.onosproject.net.PortNumber> inPorts, Set<org.onosproject.net.PortNumber> outPorts, Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> labels)
intent - the intent to compiledeviceId - the affected deviceinPorts - the input portsoutPorts - the output portslabels - the labels for the label switching hop by hopprotected LinkCollectionCompiler.ForwardingInstructions createForwardingInstruction(Optional<org.onosproject.net.intent.constraint.EncapsulationConstraint> encapConstraint, org.onosproject.net.intent.LinkCollectionIntent intent, org.onosproject.net.PortNumber inPort, Set<org.onosproject.net.PortNumber> outPorts, org.onosproject.net.DeviceId deviceId, Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> labels)
encapConstraint - the encapsulation constraint if it is presentintent - the link collection intentinPort - the in portoutPorts - the out portsdeviceId - the current devicelabels - the labels used by the encapsulationprotected LinkCollectionCompiler.ForwardingInstructions createForwardingInstructions(org.onosproject.net.intent.LinkCollectionIntent intent, org.onosproject.net.PortNumber inPort, org.onosproject.net.DeviceId deviceId, Set<org.onosproject.net.PortNumber> outPorts)
intent - the intent to compileinPort - the input port of this devicedeviceId - the current deviceoutPorts - the output ports of this deviceprotected LinkCollectionCompiler.ForwardingInstructions createForwardingInstructions(org.onosproject.net.intent.LinkCollectionIntent intent, org.onosproject.net.PortNumber inPort, org.onlab.util.Identifier<?> inLabel, org.onosproject.net.DeviceId deviceId, Set<org.onosproject.net.PortNumber> outPorts, Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> outLabels, org.onosproject.net.EncapsulationType type)
intent - the intent to compileinPort - the input port of this deviceinLabel - the label associated to the input portdeviceId - the current deviceoutPorts - the output ports of this deviceoutLabels - the labels associated to the output porttype - the encapsulation typeprotected void computePorts(org.onosproject.net.intent.LinkCollectionIntent intent,
com.google.common.collect.SetMultimap<org.onosproject.net.DeviceId,org.onosproject.net.PortNumber> inputPorts,
com.google.common.collect.SetMultimap<org.onosproject.net.DeviceId,org.onosproject.net.PortNumber> outputPorts)
intent - the related intentsinputPorts - the input ports to computeoutputPorts - the output ports to computeprotected Optional<org.onosproject.net.intent.constraint.EncapsulationConstraint> getIntentEncapConstraint(org.onosproject.net.intent.LinkCollectionIntent intent)
intent - the intent to analyze