[ONOS-7948] Netconf driver for Lumentum ROADM-20.
Added support for flowrules coming from the compilation of an OpticalConnectivityIntent.
FlowRules coming from ROADM app are still supported.
Minor updates to DeviceDiscovery and PowerConfig.
Patch 2: Driver and OpticalPathIntent support for partner-ports.
Now bidirectional intents can be configured also in presence of unidirectional links.
ROADM app visualizes devices of type TERMINAL_DEVICE and partner port details.
Checkstyle.
Patch 3: [ONOS-7974] [ONOS-79076] partner-port renamed to reverse-port. Bug fix.
Addressed comments by Ramon Casellas and Andrea Campanella. Checkstyles.
Patch 4: documentation.
Patch 5: addressed comments by Andrea Campanella.
Patch 6: checkstyle.
Change-Id: Ie5ca41eee6cb6f8f87f076f2af19c99cadd6d851
diff --git a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
index 52a73d5..192eb2e 100644
--- a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
+++ b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
@@ -31,6 +31,7 @@
import org.onosproject.net.OchSignal;
import org.onosproject.net.Port;
import org.onosproject.net.PortNumber;
+import org.onosproject.net.intent.OpticalPathIntent;
import org.onosproject.net.optical.OpticalAnnotations;
import org.onosproject.ui.RequestHandler;
import org.onosproject.ui.UiConnection;
@@ -69,6 +70,7 @@
private static final String ROADM_SET_OPS_MODE_RESP = "roadmSetOpsModeResponse";
private static final String ID = "id";
+ private static final String REVERSE_PORT = "reversePort";
private static final String NAME = "name";
private static final String TYPE = "type";
private static final String ENABLED = "enabled";
@@ -82,7 +84,7 @@
private static final String SERVICE_STATE = "serviceState";
private static final String[] COLUMN_IDS = {
- ID, TYPE, NAME, ENABLED, MIN_FREQ, MAX_FREQ, GRID, POWER_RANGE,
+ ID, REVERSE_PORT, TYPE, NAME, ENABLED, MIN_FREQ, MAX_FREQ, GRID, POWER_RANGE,
CURRENT_POWER, SERVICE_STATE, TARGET_POWER, HAS_TARGET_POWER
};
@@ -139,6 +141,8 @@
PortNumber portNum = port.number();
getFrequencyLimit(deviceId, portNum);
row.cell(ID, portNum.toLong())
+ .cell(REVERSE_PORT, RoadmUtil.getAnnotation(port.annotations(),
+ OpticalPathIntent.REVERSE_PORT_ANNOTATION_KEY))
.cell(TYPE, port.type())
.cell(ENABLED, port.isEnabled())
.cell(NAME, RoadmUtil.getAnnotation(port.annotations(), AnnotationKeys.PORT_NAME))