Package org.onosproject.net.intent
Class ConnectivityIntent
- java.lang.Object
-
- org.onosproject.net.intent.Intent
-
- org.onosproject.net.intent.ConnectivityIntent
-
- Direct Known Subclasses:
HostToHostIntent,LinkCollectionIntent,MultiPointToSinglePointIntent,PathIntent,PointToPointIntent,ProtectedTransportIntent,SinglePointToMultiPointIntent,TwoWayP2PIntent
@Beta public abstract class ConnectivityIntent extends Intent
Abstraction of connectivity intent for traffic matching some criteria.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConnectivityIntent.BuilderAbstract builder for connectivity intents.
-
Field Summary
-
Fields inherited from class org.onosproject.net.intent.Intent
DEFAULT_INTENT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConnectivityIntent()Constructor for serializer.protectedConnectivityIntent(ApplicationId appId, Key key, java.util.Collection<NetworkResource> resources, TrafficSelector selector, TrafficTreatment treatment, java.util.List<Constraint> constraints, int priority, ResourceGroup resourceGroup)Creates a connectivity intent that matches on the specified selector and applies the specified treatment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Constraint>constraints()Returns the set of connectivity constraints.protected static java.util.Collection<NetworkResource>resources(java.util.Collection<Link> links)Produces a collection of network resources from the given links.protected static java.util.Collection<NetworkResource>resources(java.util.Collection<NetworkResource> resources, java.util.Collection<Link> links)Produces a collection of network resources from the given links.TrafficSelectorselector()Returns the match specifying the type of traffic.TrafficTreatmenttreatment()Returns the action applied to the traffic.-
Methods inherited from class org.onosproject.net.intent.Intent
appId, bindIdGenerator, equals, hashCode, id, isInstallable, key, priority, resourceGroup, resources, unbindIdGenerator
-
-
-
-
Constructor Detail
-
ConnectivityIntent
protected ConnectivityIntent(ApplicationId appId, Key key, java.util.Collection<NetworkResource> resources, TrafficSelector selector, TrafficTreatment treatment, java.util.List<Constraint> constraints, int priority, ResourceGroup resourceGroup)
Creates a connectivity intent that matches on the specified selector and applies the specified treatment.Path will be optimized based on the first constraint if one is given.
- Parameters:
appId- application identifierkey- explicit key to use for intentresources- required network resources (optional)selector- traffic selectortreatment- treatmentconstraints- optional prioritized list of constraintspriority- priority to use for flows generated by this intentresourceGroup- resource group for this intent- Throws:
java.lang.NullPointerException- if the selector or treatment is null
-
ConnectivityIntent
protected ConnectivityIntent()
Constructor for serializer.
-
-
Method Detail
-
selector
public TrafficSelector selector()
Returns the match specifying the type of traffic.- Returns:
- traffic match
-
treatment
public TrafficTreatment treatment()
Returns the action applied to the traffic.- Returns:
- applied action
-
constraints
public java.util.List<Constraint> constraints()
Returns the set of connectivity constraints.- Returns:
- list of intent constraints
-
resources
protected static java.util.Collection<NetworkResource> resources(java.util.Collection<NetworkResource> resources, java.util.Collection<Link> links)
Produces a collection of network resources from the given links.- Parameters:
resources- base resourceslinks- collection of links- Returns:
- collection of resources
-
resources
protected static java.util.Collection<NetworkResource> resources(java.util.Collection<Link> links)
Produces a collection of network resources from the given links.- Parameters:
links- collection of links- Returns:
- collection of link resources
-
-