Package org.onosproject.net.intent
Class PathIntent
- java.lang.Object
-
- org.onosproject.net.intent.Intent
-
- org.onosproject.net.intent.ConnectivityIntent
-
- org.onosproject.net.intent.PathIntent
-
@Beta public class PathIntent extends ConnectivityIntent
Abstraction of explicitly path specified connectivity intent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PathIntent.Builder
Builder of a host to host intent.static class
PathIntent.ProtectionType
-
Field Summary
-
Fields inherited from class org.onosproject.net.intent.Intent
DEFAULT_INTENT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PathIntent()
Constructor for serializer.protected
PathIntent(ApplicationId appId, Key key, TrafficSelector selector, TrafficTreatment treatment, Path path, java.util.List<Constraint> constraints, int priority, PathIntent.ProtectionType type, ResourceGroup resourceGroup)
Creates a new point-to-point intent with the supplied ingress/egress ports and using the specified explicit path, which can be classified as PRIMARY or BACKUP.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PathIntent.Builder
builder()
Returns a new host to host intent builder.Path
path()
Returns the links which the traffic goes along.java.lang.String
toString()
PathIntent.ProtectionType
type()
static void
validate(java.util.List<Link> links)
Validates that source element ID and destination element ID of a link are different for the specified all links and that destination element ID of a link and source element ID of the next adjacent source element ID are same for the specified all links.-
Methods inherited from class org.onosproject.net.intent.ConnectivityIntent
constraints, resources, resources, selector, treatment
-
Methods inherited from class org.onosproject.net.intent.Intent
appId, bindIdGenerator, equals, hashCode, id, isInstallable, key, priority, resourceGroup, resources, unbindIdGenerator
-
-
-
-
Constructor Detail
-
PathIntent
protected PathIntent(ApplicationId appId, Key key, TrafficSelector selector, TrafficTreatment treatment, Path path, java.util.List<Constraint> constraints, int priority, PathIntent.ProtectionType type, ResourceGroup resourceGroup)
Creates a new point-to-point intent with the supplied ingress/egress ports and using the specified explicit path, which can be classified as PRIMARY or BACKUP.- Parameters:
appId
- application identifierkey
- intent keyselector
- traffic selectortreatment
- treatmentpath
- traversed linksconstraints
- optional list of constraintspriority
- priority to use for the generated flowstype
- PRIMARY or BACKUPresourceGroup
- resource group for this intent- Throws:
java.lang.NullPointerException
-path
is null
-
PathIntent
protected PathIntent()
Constructor for serializer.
-
-
Method Detail
-
builder
public static PathIntent.Builder builder()
Returns a new host to host intent builder.- Returns:
- host to host intent builder
-
validate
public static void validate(java.util.List<Link> links)
Validates that source element ID and destination element ID of a link are different for the specified all links and that destination element ID of a link and source element ID of the next adjacent source element ID are same for the specified all links.- Parameters:
links
- links to be validated
-
path
public Path path()
Returns the links which the traffic goes along.- Returns:
- traversed links
-
type
public PathIntent.ProtectionType type()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-