PCE update to support constraints
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / gnpy / GnpyResult.java
index 2767005e222a59e9a58afa93560dfabb152b264c..4aa3131b88cabc311fc42dfbde472cd86a8d1e8a 100644 (file)
@@ -149,8 +149,9 @@ public class GnpyResult {
                 NoPathCase noPathCase = (NoPathCase) response.getResponseType();
                 String noPathType = noPathCase.getNoPath().getNoPath();
                 LOG.info("GNPy: No path - {}",noPathType);
-                if (((noPathType == "NO_FEASIBLE_BAUDRATE_WITH_SPACING") && (noPathType == "NO_FEASIBLE_MODE"))
-                        && ((noPathType ==  "MODE_NOT_FEASIBLE") && (noPathType == "NO_SPECTRUM"))) {
+                if (((noPathType.equals("NO_FEASIBLE_BAUDRATE_WITH_SPACING"))
+                        && (noPathType.equals("NO_FEASIBLE_MODE"))) && ((noPathType.equals("MODE_NOT_FEASIBLE"))
+                        && (noPathType.equals("NO_SPECTRUM")))) {
                     List<PathMetric> pathMetricList = noPathCase.getNoPath().getPathProperties().getPathMetric();
                     LOG.info("GNPy : path is not feasible : {}", noPathType);
                     for (PathMetric pathMetric : pathMetricList) {
@@ -295,4 +296,8 @@ public class GnpyResult {
         }
         return Optional.ofNullable((T) bindingNodeEntry.getValue());
     }
+
+    public Response getResponse() {
+        return response;
+    }
 }