Removal of deprecated APIs

- OchSignal constructor
- unfiltered connect point methods in single point to multi point intents
- useBackup() method from disjoint paths
- ChannelAdapter class
- getLastUpdatedInstant() method from cluster store
- switchWorkingPath() method from protection config behaviour
- getVersion() method from partition
- getFlowRulesById() method from flow rule service

Change-Id: I5c6c2f31725f7e7e44ac2abb18ce3fb96b09d93e
diff --git a/apps/flowanalyzer/src/test/java/org/onosproject/flowanalyzer/MockFlowRuleService.java b/apps/flowanalyzer/src/test/java/org/onosproject/flowanalyzer/MockFlowRuleService.java
index a03421e..60d4889 100644
--- a/apps/flowanalyzer/src/test/java/org/onosproject/flowanalyzer/MockFlowRuleService.java
+++ b/apps/flowanalyzer/src/test/java/org/onosproject/flowanalyzer/MockFlowRuleService.java
@@ -101,13 +101,6 @@
     }
 
     @Override
-    public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
-        return flows.stream()
-                .filter(flow -> flow.appId() == id.id())
-                .collect(Collectors.toList());
-    }
-
-    @Override
     public Iterable<FlowRule> getFlowRulesByGroupId(ApplicationId appId, short groupId) {
         return flows.stream()
                 .filter(flow -> flow.appId() == appId.id() && flow.groupId().id() == groupId)
diff --git a/apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java b/apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
index d61a5e6..cee2870 100644
--- a/apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
+++ b/apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.mfwd.impl;
 
+import org.onosproject.net.FilteredConnectPoint;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
@@ -266,7 +267,10 @@
         private Key setIntent(McastRoute route) {
 
             ConnectPoint ingressPoint = mcastRouteManager.fetchSource(route);
-            Set<ConnectPoint> egressPoints = new HashSet<>(mcastRouteManager.fetchSinks(route));
+            Set<FilteredConnectPoint> filteredEgressPoints = new HashSet<>();
+            mcastRouteManager.fetchSinks(route).iterator()
+                .forEachRemaining(point -> filteredEgressPoints.add(new FilteredConnectPoint(point)));
+
 
             TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
             TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
@@ -284,11 +288,11 @@
                     .appId(appId)
                     .selector(selector.build())
                     .treatment(treatment)
-                    .ingressPoint(ingressPoint);
+                    .filteredIngressPoint(new FilteredConnectPoint(ingressPoint));
 
             // allowing intent to be pushed without egress points means we can drop packets.
-            if (!egressPoints.isEmpty()) {
-                builder.egressPoints(egressPoints);
+            if (!filteredEgressPoints.isEmpty()) {
+                builder.filteredEgressPoints(filteredEgressPoints);
             }
 
             SinglePointToMultiPointIntent intent = builder.build();
diff --git a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
index 2abe2a6..323f32e 100644
--- a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
+++ b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
@@ -127,7 +127,7 @@
             log.warn("No protected transport endpoint state found in device {}", deviceId);
             return;
         }
-        behaviour.switchWorkingPath(map.keySet().toArray(new ConnectPoint[0])[0], index);
+        behaviour.switchToManual(map.keySet().toArray(new ConnectPoint[0])[0], index);
     }
 
     @Deprecated
diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
index f501696..012f3b6 100644
--- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
+++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
@@ -163,13 +163,6 @@
 
     @Override
     public void removeFlowRulesById(ApplicationId id) {
-        removeFlowRules(Iterables.toArray(getFlowRulesById(id), FlowRule.class));
-    }
-
-    @Override
-    public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
-        DeviceService deviceService = manager.get(networkId(), DeviceService.class);
-
         Set<FlowRule> flowEntries = Sets.newHashSet();
         for (Device d : deviceService.getDevices()) {
             for (FlowEntry flowEntry : store.getFlowEntries(networkId(), d.id())) {
@@ -178,7 +171,7 @@
                 }
             }
         }
-        return flowEntries;
+        removeFlowRules(Iterables.toArray(flowEntries, FlowRule.class));
     }
 
     @Override
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
index 17f1072..8192dd45 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
@@ -20,6 +20,7 @@
 import org.apache.karaf.shell.api.action.Completion;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.FilteredConnectPoint;
 import org.onosproject.net.flow.TrafficSelector;
 import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.intent.Constraint;
@@ -54,11 +55,11 @@
         String ingressDeviceString = deviceStrings[0];
         ConnectPoint ingressPoint = ConnectPoint.deviceConnectPoint(ingressDeviceString);
 
-        Set<ConnectPoint> egressPoints = new HashSet<>();
+        Set<FilteredConnectPoint> egressPoints = new HashSet<>();
         for (int index = 1; index < deviceStrings.length; index++) {
             String egressDeviceString = deviceStrings[index];
             ConnectPoint egress = ConnectPoint.deviceConnectPoint(egressDeviceString);
-            egressPoints.add(egress);
+            egressPoints.add(new FilteredConnectPoint(egress));
         }
 
         TrafficSelector selector = buildTrafficSelector();
@@ -71,8 +72,8 @@
                         .key(key())
                         .selector(selector)
                         .treatment(treatment)
-                        .ingressPoint(ingressPoint)
-                        .egressPoints(egressPoints)
+                        .filteredIngressPoint(new FilteredConnectPoint(ingressPoint))
+                        .filteredEgressPoints(egressPoints)
                         .constraints(constraints)
                         .priority(priority())
                         .resourceGroup(resourceGroup())
diff --git a/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java b/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
index fdcd315..716168d 100644
--- a/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
+++ b/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
@@ -15,13 +15,11 @@
  */
 package org.onosproject.cluster;
 
-import org.joda.time.DateTime;
 import org.onlab.packet.IpAddress;
 import org.onosproject.core.Version;
 import org.onosproject.store.Store;
 
 import java.time.Instant;
-import java.util.Optional;
 import java.util.Set;
 
 /**
@@ -87,28 +85,7 @@
      * @param nodeId controller node identifier
      * @return system time when the availability state was last updated.
      */
-    default Instant getLastUpdatedInstant(NodeId nodeId) {
-        return Optional.ofNullable(getLastUpdated(nodeId))
-                    .map(DateTime::getMillis)
-                    .map(Instant::ofEpochMilli)
-                    .orElse(null);
-    }
-
-    /**
-     * Returns the system when the availability state was last updated.
-     *
-     * @param nodeId controller node identifier
-     * @return system time when the availability state was last updated.
-     *
-     * @deprecated in 1.12.0
-     */
-    @Deprecated
-    default DateTime getLastUpdated(NodeId nodeId) {
-        return Optional.ofNullable(getLastUpdatedInstant(nodeId))
-                .map(Instant::toEpochMilli)
-                .map(DateTime::new)
-                .orElse(null);
-    }
+    Instant getLastUpdatedInstant(NodeId nodeId);
 
     /**
      * Adds a new controller node to the cluster.
diff --git a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
index f0a73b6..491f9a9 100644
--- a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
+++ b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
@@ -15,13 +15,12 @@
  */
 package org.onosproject.cluster;
 
-import java.util.Collection;
-import java.util.Objects;
-
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Sets;
-import org.onosproject.core.Version;
+
+import java.util.Collection;
+import java.util.Objects;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
@@ -68,11 +67,6 @@
     }
 
     @Override
-    public Version getVersion() {
-        return null;
-    }
-
-    @Override
     public Collection<NodeId> getMembers() {
         return members;
     }
diff --git a/core/api/src/main/java/org/onosproject/cluster/Partition.java b/core/api/src/main/java/org/onosproject/cluster/Partition.java
index 33bc68f..c73357d 100644
--- a/core/api/src/main/java/org/onosproject/cluster/Partition.java
+++ b/core/api/src/main/java/org/onosproject/cluster/Partition.java
@@ -17,8 +17,6 @@
 
 import java.util.Collection;
 
-import org.onosproject.core.Version;
-
 /**
  * A partition or shard is a group of controller nodes that are work together to maintain state.
  * A ONOS cluster is typically made of of one or partitions over which the the data is partitioned.
@@ -32,15 +30,6 @@
     PartitionId getId();
 
     /**
-     * Returns the partition version.
-     *
-     * @return the partition version
-     * @deprecated since 1.14
-     */
-    @Deprecated
-    Version getVersion();
-
-    /**
      * Returns the controller nodes that are members of this partition.
      * @return collection of controller node identifiers
      */
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java b/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
index 67d9b56..fba79bd 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
@@ -98,10 +98,4 @@
         }
         return false;
     }
-
-    @Deprecated
-    @Override
-    public boolean useBackup() {
-        return false;
-    }
 }
diff --git a/core/api/src/main/java/org/onosproject/net/DisjointPath.java b/core/api/src/main/java/org/onosproject/net/DisjointPath.java
index b7ff6e4..b96d713 100644
--- a/core/api/src/main/java/org/onosproject/net/DisjointPath.java
+++ b/core/api/src/main/java/org/onosproject/net/DisjointPath.java
@@ -26,17 +26,6 @@
 public interface DisjointPath extends Path {
 
     /**
-     * Uses backup path.
-     *
-     * @return boolean corresponding to whether request to use
-     *          backup was successful.
-     *
-     * @deprecated in 1.11.0
-     */
-    @Deprecated
-    boolean useBackup();
-
-    /**
      * Gets primary path.
      *
      * @return primary path
diff --git a/core/api/src/main/java/org/onosproject/net/OchSignal.java b/core/api/src/main/java/org/onosproject/net/OchSignal.java
index 2234aaf..d7d2625 100644
--- a/core/api/src/main/java/org/onosproject/net/OchSignal.java
+++ b/core/api/src/main/java/org/onosproject/net/OchSignal.java
@@ -95,23 +95,6 @@
     }
 
     /**
-     * Creates OCh signal.
-     *
-     * @param centerFrequency frequency
-     * @param channelSpacing spacing
-     * @param slotGranularity granularity
-     * @deprecated 1.4.0 Emu Release
-     */
-    @Deprecated
-    public OchSignal(Frequency centerFrequency, ChannelSpacing channelSpacing, int slotGranularity) {
-        this.gridType = DEFAULT_OCH_GRIDTYPE;
-        this.channelSpacing = channelSpacing;
-        this.spacingMultiplier = (int) Math.round((double) centerFrequency.
-                subtract(Spectrum.CENTER_FREQUENCY).asHz() / channelSpacing().frequency().asHz());
-        this.slotGranularity = slotGranularity;
-    }
-
-    /**
      * Returns grid type.
      *
      * @return grid type
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java b/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
index a2261ed..7280a34 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
@@ -153,18 +153,6 @@
     }
 
     /**
-     * Attempts to manually switch working path to the one specified by {@code index}.
-     *
-     * @param identifier {@link ConnectPoint} for the virtual Port representing
-     *                     protected path endpoint
-     * @param index working path index to switch to
-     * @return Completes if request was accepted, fails exceptionally on error.
-     *         Note: completion does not always assure working path has switched.
-     */
-    @Deprecated
-    CompletableFuture<Void> switchWorkingPath(ConnectPoint identifier, int index);
-
-    /**
      * Attempts to forcibly switch to the one specified path by {@code index}.
      *
      * @param identifier {@link ConnectPoint} for the virtual Port representing
@@ -187,9 +175,7 @@
      * @return Completes if request was accepted, fails exceptionally on error.
      *         Note: completion does not always assure working path has switched.
      */
-    default CompletableFuture<Void> switchToManual(ConnectPoint identifier, int index) {
-        return switchWorkingPath(identifier, index);
-    }
+    CompletableFuture<Void> switchToManual(ConnectPoint identifier, int index);
 
     /**
      * Attempts to set the device to automatic protection mode.
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
index 0ade2ed..af9e57f 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
@@ -125,15 +125,6 @@
      * @param id the application ID to look up
      * @return collection of flow rules
      */
-    @Deprecated
-    Iterable<FlowRule> getFlowRulesById(ApplicationId id);
-
-    /**
-     * Returns a list of rules with this application ID.
-     *
-     * @param id the application ID to look up
-     * @return collection of flow rules
-     */
     Iterable<FlowEntry> getFlowEntriesById(ApplicationId id);
 
     /**
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 4625083..d12702e 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
@@ -167,44 +167,6 @@
         }
 
         /**
-         * Sets the ingress point of the single point to multi point intent
-         * that will be built.
-         *
-         * @param ingressPoint ingress connect point
-         * @return this builder
-         */
-        @Deprecated
-        public Builder ingressPoint(ConnectPoint ingressPoint) {
-            if (this.ingressPoint != null) {
-                log.warn("Ingress point is already set, " +
-                "this will override original ingress point.");
-            }
-            this.ingressPoint = new FilteredConnectPoint(ingressPoint);
-            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.");
-            }
-            Set<FilteredConnectPoint> filteredConnectPoints =
-                    egressPoints.stream()
-                            .map(FilteredConnectPoint::new)
-                            .collect(Collectors.toSet());
-            this.egressPoints = ImmutableSet.copyOf(filteredConnectPoints);
-            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/core/netty/ChannelAdapter.java b/core/api/src/test/java/org/onosproject/core/netty/ChannelAdapter.java
deleted file mode 100644
index 667084e..0000000
--- a/core/api/src/test/java/org/onosproject/core/netty/ChannelAdapter.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core.netty;
-
-import java.net.SocketAddress;
-
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelConfig;
-import org.jboss.netty.channel.ChannelFactory;
-import org.jboss.netty.channel.ChannelFuture;
-import org.jboss.netty.channel.ChannelPipeline;
-
-/**
- * Adapter for testing against a netty channel.
- *
- * @deprecated in 1.11.0
- */
-@Deprecated
-public class ChannelAdapter implements Channel {
-    @Override
-    public Integer getId() {
-        return null;
-    }
-
-    @Override
-    public ChannelFactory getFactory() {
-        return null;
-    }
-
-    @Override
-    public Channel getParent() {
-        return null;
-    }
-
-    @Override
-    public ChannelConfig getConfig() {
-        return null;
-    }
-
-    @Override
-    public ChannelPipeline getPipeline() {
-        return null;
-    }
-
-    @Override
-    public boolean isOpen() {
-        return false;
-    }
-
-    @Override
-    public boolean isBound() {
-        return false;
-    }
-
-    @Override
-    public boolean isConnected() {
-        return false;
-    }
-
-    @Override
-    public SocketAddress getLocalAddress() {
-        return null;
-    }
-
-    @Override
-    public SocketAddress getRemoteAddress() {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture write(Object o) {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture write(Object o, SocketAddress socketAddress) {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture bind(SocketAddress socketAddress) {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture connect(SocketAddress socketAddress) {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture disconnect() {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture unbind() {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture close() {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture getCloseFuture() {
-        return null;
-    }
-
-    @Override
-    public int getInterestOps() {
-        return 0;
-    }
-
-    @Override
-    public boolean isReadable() {
-        return false;
-    }
-
-    @Override
-    public boolean isWritable() {
-        return false;
-    }
-
-    @Override
-    public ChannelFuture setInterestOps(int i) {
-        return null;
-    }
-
-    @Override
-    public ChannelFuture setReadable(boolean b) {
-        return null;
-    }
-
-    @Override
-    public boolean getUserDefinedWritability(int i) {
-        return false;
-    }
-
-    @Override
-    public void setUserDefinedWritability(int i, boolean b) {
-
-    }
-
-    @Override
-    public Object getAttachment() {
-        return null;
-    }
-
-    @Override
-    public void setAttachment(Object o) {
-
-    }
-
-    @Override
-    public int compareTo(Channel o) {
-        return 0;
-    }
-}
diff --git a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
index 56cfe03..21fd045 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
@@ -50,11 +50,6 @@
     }
 
     @Override
-    public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
-        return null;
-    }
-
-    @Override
     public Iterable<FlowEntry> getFlowEntriesById(ApplicationId id) {
         return null;
     }
diff --git a/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
index c00279a..12d8bcc 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
@@ -16,6 +16,11 @@
 package org.onosproject.net.intent;
 
 import org.junit.Test;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.FilteredConnectPoint;
+
+import java.util.HashSet;
+import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
@@ -70,14 +75,20 @@
         assertEquals("incorrect filtered egress", FPS2, intent.filteredEgressPoints());
     }
 
+    private Set<FilteredConnectPoint> filterPoints(Set<ConnectPoint> points) {
+        HashSet<FilteredConnectPoint> result = new HashSet<>();
+        points.iterator().forEachRemaining(point -> result.add(new FilteredConnectPoint(point)));
+        return result;
+    }
+
     @Override
     protected SinglePointToMultiPointIntent createOne() {
         return SinglePointToMultiPointIntent.builder()
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P1)
-                .egressPoints(PS2)
+                .filteredIngressPoint(new FilteredConnectPoint(P1))
+                .filteredEgressPoints(filterPoints(PS2))
                 .build();
     }
 
@@ -87,8 +98,8 @@
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P2)
-                .egressPoints(PS1)
+                .filteredIngressPoint(new FilteredConnectPoint(P2))
+                .filteredEgressPoints(filterPoints(PS1))
                 .build();
     }
 
@@ -97,8 +108,8 @@
                 .appId(APPID)
                 .selector(MATCH)
                 .treatment(NOP)
-                .ingressPoint(P2)
-                .egressPoints(PS1)
+                .filteredIngressPoint(new FilteredConnectPoint(P2))
+                .filteredEgressPoints(filterPoints(PS1))
                 .resourceGroup(RESOURCE_GROUP)
                 .build();
     }
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/SinglePointToMultiPointIntentCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/SinglePointToMultiPointIntentCodec.java
index bd7863d..6d56b25 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/SinglePointToMultiPointIntentCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/SinglePointToMultiPointIntentCodec.java
@@ -20,6 +20,7 @@
 import org.onosproject.codec.CodecContext;
 import org.onosproject.codec.JsonCodec;
 import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.FilteredConnectPoint;
 import org.onosproject.net.intent.ConnectivityIntent;
 import org.onosproject.net.intent.SinglePointToMultiPointIntent;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -76,7 +77,7 @@
                 INGRESS_POINT + IntentCodec.MISSING_MEMBER_MESSAGE);
         ConnectPoint ingress = context.codec(ConnectPoint.class)
                 .decode(ingressJson, context);
-        builder.ingressPoint(ingress);
+        builder.filteredIngressPoint(new FilteredConnectPoint(ingress));
 
         ObjectNode egressJson = nullIsIllegal(get(json, EGRESS_POINT),
                 EGRESS_POINT + IntentCodec.MISSING_MEMBER_MESSAGE);
@@ -85,13 +86,13 @@
                     context.codec(ConnectPoint.class);
             JsonNode connectPointsJson = get(json, EGRESS_POINT).get(CP_POINTS);
 
-            Set<ConnectPoint> egressCp = new HashSet<ConnectPoint>();
+            Set<FilteredConnectPoint> egressCp = new HashSet<>();
             if (connectPointsJson != null) {
                 for (int i = 0; i < connectPointsJson.size(); i++) {
-                    egressCp.add(connectPointCodec.decode(get(connectPointsJson, i),
-                            context));
+                    ConnectPoint cp = connectPointCodec.decode(get(connectPointsJson, i), context);
+                    egressCp.add(new FilteredConnectPoint(cp));
                 }
-                builder.egressPoints(egressCp);
+                builder.filteredEgressPoints(egressCp);
             }
         }
 
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
index 1af7c82..99ee528 100644
--- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -296,13 +296,6 @@
     @Override
     public void removeFlowRulesById(ApplicationId id) {
         checkPermission(FLOWRULE_WRITE);
-        removeFlowRules(Iterables.toArray(getFlowRulesById(id), FlowRule.class));
-    }
-
-    @Deprecated
-    @Override
-    public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
-        checkPermission(FLOWRULE_READ);
 
         Set<FlowRule> flowEntries = Sets.newHashSet();
         for (Device d : deviceService.getDevices()) {
@@ -312,7 +305,7 @@
                 }
             }
         }
-        return flowEntries;
+        removeFlowRules(Iterables.toArray(flowEntries, FlowRule.class));
     }
 
     @Override
diff --git a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
index f4549c5..67ed692 100644
--- a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
@@ -420,16 +420,6 @@
     }
 
     @Test
-    public void getByAppId() {
-        FlowRule f1 = flowRule(1, 1);
-        FlowRule f2 = flowRule(2, 2);
-        mgr.applyFlowRules(f1, f2);
-
-        assertTrue("should have two rules",
-                   Lists.newLinkedList(mgr.getFlowRulesById(appId)).size() == 2);
-    }
-
-    @Test
     public void removeByAppId() {
         FlowRule f1 = flowRule(1, 1);
         FlowRule f2 = flowRule(2, 2);
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/MockFlowRuleService.java b/core/net/src/test/java/org/onosproject/net/intent/impl/MockFlowRuleService.java
index 21271b6..31cebe0 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/MockFlowRuleService.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/MockFlowRuleService.java
@@ -96,13 +96,6 @@
     }
 
     @Override
-    public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
-        return flows.stream()
-                    .filter(flow -> flow.appId() == id.id())
-                    .collect(Collectors.toList());
-    }
-
-    @Override
     public Iterable<FlowRule> getFlowRulesByGroupId(ApplicationId appId, short groupId) {
         return flows.stream()
                 .filter(flow -> flow.appId() == appId.id() && flow.groupId().id() == groupId)
diff --git a/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalProtectionSwitchConfig.java b/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalProtectionSwitchConfig.java
index 677d694..9f2254c 100644
--- a/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalProtectionSwitchConfig.java
+++ b/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalProtectionSwitchConfig.java
@@ -141,11 +141,6 @@
     }
 
     @Override
-    public CompletableFuture<Void> switchWorkingPath(ConnectPoint identifier, int index) {
-        return switchToManual(identifier, index);
-    }
-
-    @Override
     public CompletableFuture<Void> switchToForce(ConnectPoint identifier, int index) {
         return getProtectionEndpointConfig(identifier)
                 .thenApply(m -> m.paths().get(index))
diff --git a/drivers/optical/src/main/java/org/onosproject/driver/optical/protection/OplinkSwitchProtection.java b/drivers/optical/src/main/java/org/onosproject/driver/optical/protection/OplinkSwitchProtection.java
index 9ea408b..7612b86 100644
--- a/drivers/optical/src/main/java/org/onosproject/driver/optical/protection/OplinkSwitchProtection.java
+++ b/drivers/optical/src/main/java/org/onosproject/driver/optical/protection/OplinkSwitchProtection.java
@@ -156,11 +156,6 @@
     }
 
     @Override
-    public CompletableFuture<Void> switchWorkingPath(ConnectPoint identifier, int index) {
-        return switchToManual(identifier, index);
-    }
-
-    @Override
     public CompletableFuture<Void> switchToForce(ConnectPoint identifier, int index) {
         // TODO
         // Currently not supported for openflow device.