Remove deprecated non-filtered ingress and egress connect point APIs
Change-Id: Ie360dfc2288b27587ffcdb23bc29f266df1a8d73
diff --git a/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java b/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
index 91db96d..40f13d0 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/LinkCollectionIntent.java
@@ -172,44 +172,6 @@
}
/**
- * Sets the ingress point of the single point to multi point intent
- * that will be built.
- *
- * @param ingressPoints ingress connect points
- * @return this builder
- */
- @Deprecated
- public Builder ingressPoints(Set<ConnectPoint> ingressPoints) {
- if (this.ingressPoints != null) {
- log.warn("Ingress points are already set, " +
- "this will override original ingress points.");
- }
- this.ingressPoints = ingressPoints.stream()
- .map(FilteredConnectPoint::new)
- .collect(Collectors.toSet());
- return this;
- }
-
- /**
- * Sets the egress points of the single point to multi point intent
- * that will be built.
- *
- * @param egressPoints egress connect points
- * @return this builder
- */
- @Deprecated
- public Builder egressPoints(Set<ConnectPoint> egressPoints) {
- if (this.egressPoints != null) {
- log.warn("Egress points are already set, " +
- "this will override original egress points.");
- }
- this.egressPoints = egressPoints.stream()
- .map(FilteredConnectPoint::new)
- .collect(Collectors.toSet());
- return this;
- }
-
- /**
* Sets the filtered ingress point of the single point to multi point intent
* that will be built.
*
diff --git a/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
index b79328b..99b5e69 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
@@ -78,8 +78,8 @@
.selector(selector)
.treatment(treatment)
.links(links1)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.resourceGroup(resourceGroup)
.build();
@@ -91,8 +91,8 @@
.selector(selector)
.treatment(treatment)
.links(links2)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.resourceGroup(resourceGroup)
.build();
@@ -115,8 +115,8 @@
.selector(selector)
.treatment(treatment)
.links(links1)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.resourceGroup(resourceGroup)
.build();
@@ -149,8 +149,8 @@
.selector(selector)
.treatment(treatment)
.links(links1)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.constraints(constraints)
.priority(8888)
.build();
@@ -231,8 +231,8 @@
.selector(selector)
.treatment(treatment)
.links(links1)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.build();
}
@@ -245,8 +245,8 @@
.selector(selector)
.treatment(treatment)
.links(links2)
- .ingressPoints(ImmutableSet.of(ingress))
- .egressPoints(ImmutableSet.of(egress))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(ingress)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(egress)))
.build();
}
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
index ca8a025..1fae4b9 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
@@ -23,7 +23,6 @@
import org.onlab.packet.VlanId;
import org.onosproject.cfg.ComponentConfigAdapter;
import org.onosproject.core.CoreService;
-import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DefaultLink;
import org.onosproject.net.DeviceId;
import org.onosproject.net.FilteredConnectPoint;
@@ -88,8 +87,8 @@
.selector(selector)
.treatment(treatment)
.links(links)
- .ingressPoints(ImmutableSet.of(d1p1))
- .egressPoints(ImmutableSet.of(d3p1))
+ .filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(d1p1)))
+ .filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(d3p1)))
.build();
intentExtensionService = createMock(IntentExtensionService.class);
@@ -474,21 +473,21 @@
- Set<ConnectPoint> ingress = ImmutableSet.of(
- of1p1
+ Set<FilteredConnectPoint> ingress = ImmutableSet.of(
+ new FilteredConnectPoint(of1p1)
);
- Set<ConnectPoint> egress = ImmutableSet.of(
- of3p2,
- of4p2
+ Set<FilteredConnectPoint> egress = ImmutableSet.of(
+ new FilteredConnectPoint(of3p2),
+ new FilteredConnectPoint(of4p2)
);
intent = LinkCollectionIntent.builder()
.appId(APP_ID)
.selector(ipPrefixSelector)
.treatment(ethDstTreatment)
- .ingressPoints(ingress)
- .egressPoints(egress)
+ .filteredIngressPoints(ingress)
+ .filteredEgressPoints(egress)
.applyTreatmentOnEgress(true)
.links(testLinks)
.build();
@@ -563,13 +562,13 @@
DefaultLink.builder().providerId(PID).src(of2p2).dst(of4p1).type(DIRECT).build()
);
- Set<ConnectPoint> ingress = ImmutableSet.of(
- of1p1,
- of3p1
+ Set<FilteredConnectPoint> ingress = ImmutableSet.of(
+ new FilteredConnectPoint(of1p1),
+ new FilteredConnectPoint(of3p1)
);
- Set<ConnectPoint> egress = ImmutableSet.of(
- of4p2
+ Set<FilteredConnectPoint> egress = ImmutableSet.of(
+ new FilteredConnectPoint(of4p2)
);
TrafficSelector expectOf1Selector = DefaultTrafficSelector.builder(ipPrefixSelector)
@@ -614,8 +613,8 @@
intent = LinkCollectionIntent.builder()
.appId(APP_ID)
.selector(ipPrefixSelector)
- .ingressPoints(ingress)
- .egressPoints(egress)
+ .filteredIngressPoints(ingress)
+ .filteredEgressPoints(egress)
.treatment(ethDstTreatment)
.links(testlinks)
.build();