Simplify MP2S compiler, fix ingress/egress on same switch bug in SP2M compiler

Change-Id: Ib47bba01aac0f358f2caa5525c18e0e90a0b13ff
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index 43a7fb7..cd7200a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -27,7 +27,6 @@
 import org.onosproject.core.DefaultGroupId;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.EdgeLink;
 import org.onosproject.net.Link;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.flow.DefaultFlowRule;
@@ -78,18 +77,8 @@
         SetMultimap<DeviceId, PortNumber> outputPorts = HashMultimap.create();
 
         for (Link link : intent.links()) {
-            DeviceId srcDeviceId;
-            DeviceId dstDeviceId;
-
-            if (link instanceof EdgeLink) {
-                EdgeLink edgeLink = (EdgeLink) link;
-                dstDeviceId = edgeLink.hostLocation().deviceId();
-                srcDeviceId = dstDeviceId;
-            } else {
-                inputPorts.put(link.dst().deviceId(), link.dst().port());
-                srcDeviceId = link.src().deviceId();
-            }
-            outputPorts.put(srcDeviceId, link.src().port());
+            inputPorts.put(link.dst().deviceId(), link.dst().port());
+            outputPorts.put(link.src().deviceId(), link.src().port());
         }
 
         for (ConnectPoint ingressPoint : intent.ingressPoints()) {