Wrong Tp designation in DeviceRenderer.java 66/64766/2
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 26 Oct 2017 15:41:21 +0000 (17:41 +0200)
committerGilles THOUENON <gilles.thouenon@orange.com>
Thu, 26 Oct 2017 15:47:39 +0000 (15:47 +0000)
A bug was introduced with ch. 64616 and XPDR portmapping improvements.
Termination points were incorrectly named in some checks.
This change corrects the problem.

Change-Id: If6d9ebe3a3b88f90d16aec3fd90e5742a1ed42c7
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRenderer.java

index 94100deb589b7e7f03afae783a37f7066c70257b..ee4caacfc7c76fcc3aeea4e95e132ea52a63c462 100644 (file)
@@ -117,7 +117,7 @@ public class DeviceRenderer implements RendererService {
 
                 Long waveNumber = input.getWaveNumber();
                 String mf = input.getModulationFormat();
-                if (destTp.contains("NETWORK")) {
+                if (destTp.contains("LINE")) {
                     crossConnectFlag++;
 
                     ModulationFormat modulationFormat = null;
@@ -134,13 +134,13 @@ public class DeviceRenderer implements RendererService {
                     }
 
                     if (!new OpenRoadmXponderInterface(db, mps, nodeId, destTp, serviceName)
-                            .createLineInterfaces(waveNumber, R100G.class, ModulationFormat.Qpsk)) {
+                            .createLineInterfaces(waveNumber, R100G.class, modulationFormat)) {
 
                         return setServBldr.setResult("Unable to LINE interface on " + nodeId + " at " + destTp);
                     }
                     LOG.info("LINE interface created for node " + nodeId);
                 }
-                if (srcTp.contains("CLIENT")) {
+                if (srcTp.contains("CLNT")) {
                     crossConnectFlag++;
                     if (!new OpenRoadmXponderInterface(db, mps, nodeId, srcTp, serviceName).createClientInterfaces()) {
                         return setServBldr.setResult("Unable to Client interface on " + nodeId + " at " + srcTp);
@@ -219,7 +219,7 @@ public class DeviceRenderer implements RendererService {
             // if the node is currently mounted then proceed.
             if (currentMountedDevice.contains(nodeId)) {
 
-                if (destTp.contains("NETWORK")) {
+                if (destTp.contains("LINE")) {
                     if (new OpenRoadmInterfaces(db, mps, nodeId, destTp)
                             .deleteInterface(destTp + "-ODU") == false) {
                         LOG.error("Failed to delete interface " + destTp + "-ODU");
@@ -233,7 +233,7 @@ public class DeviceRenderer implements RendererService {
                         LOG.error("Failed to delete interface " + destTp + "-" + waveNumber);
                     }
                 }
-                if (srcTp.contains("CLIENT")) {
+                if (srcTp.contains("CLNT")) {
                     // Deleting interface on source termination point
                     if (new OpenRoadmInterfaces(db, mps, nodeId, srcTp)
                             .deleteInterface(srcTp + "-ETHERNET") == false) {