Adding support to remove a subscriber.

And fixing an issue where build on a flowrule could not be
called repeatedly.

Change-Id: I85773ac7a3fb4f2970b63599d1eafbfc8b3c5879
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
index e8b4411..0139573 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
@@ -38,7 +38,6 @@
 import org.onosproject.net.flow.DefaultFlowRule;
 import org.onosproject.net.flow.DefaultTrafficSelector;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
-import org.onosproject.net.flow.FlowEntry;
 import org.onosproject.net.flow.FlowRule;
 import org.onosproject.net.flow.FlowRuleOperations;
 import org.onosproject.net.flow.FlowRuleOperationsContext;
@@ -579,12 +578,7 @@
                 builder.add(inner.build()).add(outer.build());
                 break;
             case REMOVE:
-                Iterable<FlowEntry> flows = flowRuleService.getFlowEntries(deviceId);
-                for (FlowEntry fe : flows) {
-                    if (fe.equals(inner.build()) || fe.equals(outer.build())) {
-                        builder.remove(fe);
-                    }
-                }
+                builder.remove(inner.build()).remove(outer.build());
                 break;
             case ADD_TO_EXISTING:
                 break;