Add priority to Intents
Change-Id: Ibe63356f5b15a6aa6ca7731dba3382c3317a95ec
diff --git a/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java b/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
index 19fcc7c..721ff17 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
@@ -56,7 +56,8 @@
TrafficTreatment treatment,
Set<ConnectPoint> ingressPoints,
ConnectPoint egressPoint) {
- this(appId, selector, treatment, ingressPoints, egressPoint, Collections.emptyList());
+ this(appId, selector, treatment, ingressPoints, egressPoint,
+ Collections.emptyList(), DEFAULT_INTENT_PRIORITY);
}
/**
@@ -70,6 +71,7 @@
* @param ingressPoints set of ports from which ingress traffic originates
* @param egressPoint port to which traffic will egress
* @param constraints constraints to apply to the intent
+ * @param priority priority to use for flows generated by this intent
* @throws NullPointerException if {@code ingressPoints} or
* {@code egressPoint} is null.
* @throws IllegalArgumentException if the size of {@code ingressPoints} is
@@ -81,8 +83,10 @@
TrafficTreatment treatment,
Set<ConnectPoint> ingressPoints,
ConnectPoint egressPoint,
- List<Constraint> constraints) {
- super(appId, key, Collections.emptyList(), selector, treatment, constraints);
+ List<Constraint> constraints,
+ int priority) {
+ super(appId, key, Collections.emptyList(), selector, treatment, constraints,
+ priority);
checkNotNull(ingressPoints);
checkArgument(!ingressPoints.isEmpty(), "Ingress point set cannot be empty");
@@ -104,6 +108,7 @@
* @param ingressPoints set of ports from which ingress traffic originates
* @param egressPoint port to which traffic will egress
* @param constraints constraints to apply to the intent
+ * @param priority priority to use for flows generated by this intent
* @throws NullPointerException if {@code ingressPoints} or
* {@code egressPoint} is null.
* @throws IllegalArgumentException if the size of {@code ingressPoints} is
@@ -114,8 +119,10 @@
TrafficTreatment treatment,
Set<ConnectPoint> ingressPoints,
ConnectPoint egressPoint,
- List<Constraint> constraints) {
- this(appId, null, selector, treatment, ingressPoints, egressPoint, constraints);
+ List<Constraint> constraints,
+ int priority) {
+ this(appId, null, selector, treatment, ingressPoints, egressPoint,
+ constraints, priority);
}
/**
@@ -152,6 +159,7 @@
.add("id", id())
.add("key", key())
.add("appId", appId())
+ .add("priority", priority())
.add("resources", resources())
.add("selector", selector())
.add("treatment", treatment())