Add priority to Intents
Change-Id: Ibe63356f5b15a6aa6ca7731dba3382c3317a95ec
diff --git a/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java b/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
index 2531fae..129c4a6 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
@@ -54,7 +54,9 @@
public SinglePointToMultiPointIntent(ApplicationId appId,
TrafficSelector selector, TrafficTreatment treatment,
ConnectPoint ingressPoint, Set<ConnectPoint> egressPoints) {
- this(appId, null, selector, treatment, ingressPoint, egressPoints, Collections.emptyList());
+ this(appId, null, selector, treatment, ingressPoint, egressPoints,
+ Collections.emptyList(),
+ DEFAULT_INTENT_PRIORITY);
}
/**
@@ -67,6 +69,7 @@
* @param ingressPoint port on which traffic will ingress
* @param egressPoints set of ports on 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 ingressPoint} or
* {@code egressPoints} is null
* @throws IllegalArgumentException if the size of {@code egressPoints} is
@@ -76,8 +79,10 @@
Key key,
TrafficSelector selector, TrafficTreatment treatment,
ConnectPoint ingressPoint, Set<ConnectPoint> egressPoints,
- 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(egressPoints);
checkNotNull(ingressPoint);
checkArgument(!egressPoints.isEmpty(), "Egress point set cannot be empty");
@@ -122,6 +127,7 @@
.add("id", id())
.add("key", key())
.add("appId", appId())
+ .add("priority", priority())
.add("resources", resources())
.add("selector", selector())
.add("treatment", treatment())