OpticalCircuitIntent is extended to receive path and ochSignal (e.g., from REST optical-rest app).
If the compilation of the OpticalCirsuitIntent trigger the creation of a new OpticalConnectivityIntent
the specified path and ochSignal are used.
Patch 2: Checkstyle
Change-Id: I41aaf6f914738a57634eef0680d73ff64291c696
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 7e873d1..4f8fcbe 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
@@ -250,6 +250,8 @@
ConnectPoint dstCP = new ConnectPoint(dst.elementId(), ochPorts.getRight().number());
// Create optical connectivity intent
+ // In this case the channel and path optionally specified in this circuit intent
+ // are used to create the connectivity intent
connectivityIntent = OpticalConnectivityIntent.builder()
.appId(appId)
// TODO New top-level Intent created and submitted
@@ -261,6 +263,8 @@
.priority(OPTICAL_CONNECTIVITY_INTENT_PRIORITY)
.signalType(ochPorts.getLeft().signalType())
.bidirectional(intent.isBidirectional())
+ .ochSignal(intent.ochSignal())
+ .suggestedPath(intent.suggestedPath())
.resourceGroup(intent.resourceGroup())
.build();