Remove deprecated connect point APIs for point to point intents

Change-Id: Ie7d29a9e6d54283d3a3310ed8b1e749a631031b1
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentUtils.java b/core/api/src/main/java/org/onosproject/net/intent/IntentUtils.java
index fb5fb34..1f1f894 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentUtils.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentUtils.java
@@ -77,8 +77,10 @@
             return Objects.equals(intent1.selector(), intent2.selector()) &&
                     Objects.equals(intent1.treatment(), intent2.treatment()) &&
                     Objects.equals(intent1.constraints(), intent2.constraints()) &&
-                    Objects.equals(intent1.ingressPoint(), intent2.ingressPoint()) &&
-                    Objects.equals(intent1.egressPoint(), intent2.egressPoint());
+                    Objects.equals(intent1.filteredIngressPoint().connectPoint(),
+                            intent2.filteredIngressPoint().connectPoint()) &&
+                    Objects.equals(intent1.filteredEgressPoint().connectPoint(),
+                            intent2.filteredEgressPoint().connectPoint());
         } else {
             log.error("Unimplemented intent type");
             return false;
diff --git a/core/api/src/main/java/org/onosproject/net/intent/PointToPointIntent.java b/core/api/src/main/java/org/onosproject/net/intent/PointToPointIntent.java
index 4b191ea..1a38bfd 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/PointToPointIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/PointToPointIntent.java
@@ -15,18 +15,16 @@
  */
 package org.onosproject.net.intent;
 
-import java.util.Collections;
-import java.util.List;
-
 import com.google.common.annotations.Beta;
+import com.google.common.base.MoreObjects;
 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 com.google.common.base.MoreObjects;
+import java.util.Collections;
+import java.util.List;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -99,30 +97,6 @@
         }
 
         /**
-         * Sets the ingress point of the point to point intent that will be built.
-         *
-         * @param ingressPoint ingress connect point
-         * @return this builder
-         */
-        @Deprecated
-        public Builder ingressPoint(ConnectPoint ingressPoint) {
-            this.ingressPoint = new FilteredConnectPoint(ingressPoint);
-            return this;
-        }
-
-        /**
-         * Sets the egress point of the point to point intent that will be built.
-         *
-         * @param egressPoint egress connect point
-         * @return this builder
-         */
-        @Deprecated
-        public Builder egressPoint(ConnectPoint egressPoint) {
-            this.egressPoint = new FilteredConnectPoint(egressPoint);
-            return this;
-        }
-
-        /**
          * Sets the filtered ingress point of the point to
          * point intent that will be built.
          *
@@ -213,27 +187,6 @@
     }
 
     /**
-     * Returns the port on which the ingress traffic should be connected to
-     * the egress.
-     *
-     * @return ingress port
-     */
-    @Deprecated
-    public ConnectPoint ingressPoint() {
-        return ingressPoint.connectPoint();
-    }
-
-    /**
-     * Returns the port on which the traffic should egress.
-     *
-     * @return egress port
-     */
-    @Deprecated
-    public ConnectPoint egressPoint() {
-        return egressPoint.connectPoint();
-    }
-
-    /**
      * Returns the filtered port on which the ingress traffic should be connected to the
      * egress.
      *
diff --git a/core/api/src/test/java/org/onosproject/net/intent/PointToPointIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/PointToPointIntentTest.java
index 02bfad6..3b170a0 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/PointToPointIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/PointToPointIntentTest.java
@@ -16,6 +16,7 @@
 package org.onosproject.net.intent;
 
 import org.junit.Test;
+import org.onosproject.net.FilteredConnectPoint;
 
 import static org.junit.Assert.assertEquals;
 import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutableBaseClass;
@@ -38,14 +39,14 @@
         PointToPointIntent intent = createOne();
         assertEquals("incorrect id", APPID, intent.appId());
         assertEquals("incorrect match", MATCH, intent.selector());
-        assertEquals("incorrect ingress", P1, intent.ingressPoint());
-        assertEquals("incorrect egress", P2, intent.egressPoint());
+        assertEquals("incorrect ingress", P1, intent.filteredIngressPoint().connectPoint());
+        assertEquals("incorrect egress", P2, intent.filteredEgressPoint().connectPoint());
 
         intent = createWithResourceGroup();
         assertEquals("incorrect id", APPID, intent.appId());
         assertEquals("incorrect match", MATCH, intent.selector());
-        assertEquals("incorrect ingress", P1, intent.ingressPoint());
-        assertEquals("incorrect egress", P2, intent.egressPoint());
+        assertEquals("incorrect ingress", P1, intent.filteredIngressPoint().connectPoint());
+        assertEquals("incorrect egress", P2, intent.filteredEgressPoint().connectPoint());
         assertEquals("incorrect resource group", RESOURCE_GROUP, intent.resourceGroup());
     }
 
@@ -64,8 +65,8 @@
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P1)
-                .egressPoint(P2)
+                .filteredIngressPoint(new FilteredConnectPoint(P1))
+                .filteredEgressPoint(new FilteredConnectPoint(P2))
                 .build();
     }
 
@@ -74,8 +75,8 @@
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P1)
-                .egressPoint(P2)
+                .filteredIngressPoint(new FilteredConnectPoint(P1))
+                .filteredEgressPoint(new FilteredConnectPoint(P2))
                 .resourceGroup(RESOURCE_GROUP)
                 .build();
     }
@@ -86,8 +87,8 @@
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P2)
-                .egressPoint(P1)
+                .filteredIngressPoint(new FilteredConnectPoint(P2))
+                .filteredEgressPoint(new FilteredConnectPoint(P1))
                 .build();
     }