diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/util/OpticalIntentUtility.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/util/OpticalIntentUtility.java index 4a6af722af..8aea7c92fb 100644 --- a/apps/optical-model/src/main/java/org/onosproject/net/optical/util/OpticalIntentUtility.java +++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/util/OpticalIntentUtility.java @@ -93,7 +93,8 @@ public final class OpticalIntentUtility { CltSignalType signalType = ((OduCltPort) srcPort).signalType(); if (Type.ROADM.equals(srcDevice.type()) || Type.ROADM_OTN.equals(srcDevice.type()) || - Type.OLS.equals(srcDevice.type())) { + Type.OLS.equals(srcDevice.type()) || + Type.TERMINAL_DEVICE.equals(srcDevice.type())) { intent = OpticalCircuitIntent.builder() .appId(appId) .key(key) @@ -102,7 +103,7 @@ public final class OpticalIntentUtility { .signalType(signalType) .bidirectional(bidirectional) .build(); - } else if (Type.OTN.equals(srcDevice.type()) || Type.TERMINAL_DEVICE.equals(srcDevice.type())) { + } else if (Type.OTN.equals(srcDevice.type())) { intent = OpticalOduIntent.builder() .appId(appId) .key(key) @@ -176,7 +177,8 @@ public final class OpticalIntentUtility { CltSignalType signalType = ((OduCltPort) srcPort).signalType(); if (Type.ROADM.equals(srcDevice.type()) || Type.ROADM_OTN.equals(srcDevice.type()) || - Type.OLS.equals(srcDevice.type())) { + Type.OLS.equals(srcDevice.type()) || + Type.TERMINAL_DEVICE.equals(srcDevice.type())) { intent = OpticalCircuitIntent.builder() .appId(appId) .key(key) @@ -185,7 +187,7 @@ public final class OpticalIntentUtility { .signalType(signalType) .bidirectional(bidirectional) .build(); - } else if (Type.OTN.equals(srcDevice.type()) || Type.TERMINAL_DEVICE.equals(srcDevice.type())) { + } else if (Type.OTN.equals(srcDevice.type())) { intent = OpticalOduIntent.builder() .appId(appId) .key(key) 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 2cb1143ca1..4643d7bce4 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 @@ -306,6 +306,8 @@ public class OpticalIntentsWebResource extends AbstractWebResource { Link link = linkService.getLink(srcConnectPoint, dstConnectPoint); if (link == null) { + log.warn("Not existing link in the suggested path src {} dst {}", + srcConnectPoint, dstConnectPoint); throw new IllegalArgumentException("Not existing link in the suggested path"); }