mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-14 17:26:13 +02:00
fixing OpticalIntentUtility for support of intents from client port to client port
Change-Id: I7505abf249e8ece5643c7f7ddac07d6e7107b277 (cherry picked from commit f672231654a4a775662137e8d3a297192f856f5e)
This commit is contained in:
parent
cb7e4ec470
commit
f4e35e7d2d
@ -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)
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user