diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalCircuitIntentCompiler.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalCircuitIntentCompiler.java
index 4f8fcbe..7686e7a 100644
--- a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalCircuitIntentCompiler.java
+++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalCircuitIntentCompiler.java
@@ -30,6 +30,7 @@
 import org.onosproject.net.OduSignalType;
 import org.onosproject.net.OduSignalUtils;
 import org.onosproject.net.Port;
+import org.onosproject.net.PortNumber;
 import org.onosproject.net.TributarySlot;
 import org.onosproject.net.behaviour.TributarySlotQuery;
 import org.onosproject.net.device.DeviceService;
@@ -240,7 +241,18 @@
             required = resources;
         } else {
             // Find OCh ports with available resources
-            Pair<OchPort, OchPort> ochPorts = findPorts(intent.getSrc(), intent.getDst(), intent.getSignalType());
+            Pair<OchPort, OchPort> ochPorts = null;
+
+            if (intent.suggestedPath().isPresent()) {
+                PortNumber srcPortNumber = intent.suggestedPath().get().src().port();
+                PortNumber dstPortNumber = intent.suggestedPath().get().dst().port();
+
+                ochPorts = Pair.of(
+                        (OchPort) deviceService.getPort(intent.getSrc().deviceId(), srcPortNumber),
+                        (OchPort) deviceService.getPort(intent.getDst().deviceId(), dstPortNumber));
+            } else {
+                ochPorts = findPorts(intent.getSrc(), intent.getDst(), intent.getSignalType());
+            }
 
             if (ochPorts == null) {
                 throw new OpticalIntentCompilationException("Unable to find suitable OCH ports for intent " + intent);
diff --git a/apps/optical-rest/src/main/java/org/onosproject/net/optical/rest/OpticalIntentsWebResource.java b/apps/optical-rest/src/main/java/org/onosproject/net/optical/rest/OpticalIntentsWebResource.java
index cff8d93..1570a2e 100644
--- a/apps/optical-rest/src/main/java/org/onosproject/net/optical/rest/OpticalIntentsWebResource.java
+++ b/apps/optical-rest/src/main/java/org/onosproject/net/optical/rest/OpticalIntentsWebResource.java
@@ -32,6 +32,7 @@
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.OchSignal;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.Port;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.flow.criteria.Criterion;
 import org.onosproject.net.flow.criteria.OchSignalCriterion;
@@ -74,7 +75,7 @@
 
 
 /**
- * Query, submit and withdraw optical network intents.
+ * Query, submit and withdraw optical intents.
  */
 @Path("intents")
 public class OpticalIntentsWebResource extends AbstractWebResource {
@@ -317,10 +318,9 @@
                     listLinks.add(link);
                 }
 
-                if ((!listLinks.get(0).src().deviceId().equals(ingress.deviceId())) ||
-                        (!listLinks.get(0).src().port().equals(ingress.port())) ||
-                        (!listLinks.get(listLinks.size() - 1).dst().deviceId().equals(egress.deviceId())) ||
-                        (!listLinks.get(listLinks.size() - 1).dst().port().equals(egress.port()))) {
+                if ((!listLinks.get(0).src().deviceId().equals(ingress.deviceId()))
+                        || (!listLinks.get(listLinks.size() - 1).dst().deviceId().equals(egress.deviceId()))
+                ) {
                     throw new IllegalArgumentException(
                             "Suggested path not compatible with ingress or egress connect points");
                 }
@@ -332,6 +332,12 @@
 
                 suggestedPath = new DefaultPath(PROVIDER_ID, listLinks, new ScalarWeight(1));
 
+                if (!deviceService.getPort(suggestedPath.src()).type().equals(Port.Type.OCH)
+                || !deviceService.getPort(suggestedPath.dst()).type().equals(Port.Type.OCH)) {
+                    throw new IllegalArgumentException(
+                            "End-points of suggested path must be ports of type OCH");
+                }
+
                 log.debug("OpticalIntent along suggestedPath {}", suggestedPath);
             }
         }
