Resource group to share resources between intents
Change-Id: I5bf7d4261197449924d07dabac841cf8ccbe9389
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 8431a0a..2583b8a 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
@@ -24,6 +24,7 @@
import org.onosproject.core.ApplicationId;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.FilteredConnectPoint;
+import org.onosproject.net.ResourceGroup;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.slf4j.Logger;
@@ -67,9 +68,10 @@
FilteredConnectPoint ingressPoint,
Set<FilteredConnectPoint> egressPoints,
List<Constraint> constraints,
- int priority) {
+ int priority,
+ ResourceGroup resourceGroup) {
super(appId, key, ImmutableList.of(), selector, treatment, constraints,
- priority);
+ priority, resourceGroup);
checkNotNull(egressPoints);
checkNotNull(ingressPoint);
checkArgument(!egressPoints.isEmpty(), "Egress point set cannot be empty");
@@ -159,6 +161,11 @@
return (Builder) super.priority(priority);
}
+ @Override
+ public Builder resourceGroup(ResourceGroup resourceGroup) {
+ return (Builder) super.resourceGroup(resourceGroup);
+ }
+
/**
* Sets the ingress point of the single point to multi point intent
* that will be built.
@@ -221,7 +228,6 @@
return this;
}
-
/**
* Builds a single point to multi point intent from the
* accumulated parameters.
@@ -238,7 +244,8 @@
ingressPoint,
egressPoints,
constraints,
- priority
+ priority,
+ resourceGroup
);
}
}
@@ -308,6 +315,7 @@
.add("filteredIngressCPs", filteredIngressPoint())
.add("filteredEgressCP", filteredEgressPoints())
.add("constraints", constraints())
+ .add("resourceGroup", resourceGroup())
.toString();
}