From: Jonas MÃ¥rtensson Date: Thu, 2 Apr 2020 15:22:46 +0000 (+0200) Subject: Make PCE optical node validation fail when no PPs are available X-Git-Tag: 2.0.0~134 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=07f70fbb64a92a32631820b4f142430bc511c4c9 Make PCE optical node validation fail when no PPs are available Currently path computation succeeds even if all external PP ports on an end SRG are already used. Then the renderer will fail during service setup. It seems to me that it would be better to have the path computation fail. This is a small proposed change to make that happen. Change-Id: I92308cc7f12f9957f376c4d10b3d92323e865481 Signed-off-by: Jonas MÃ¥rtensson --- diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java index cdc764fd8..63f2bffe0 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java @@ -118,7 +118,7 @@ public class PceOpticalNode implements PceNode { break; } } - if (this.availableSrgPp.isEmpty() && this.availableSrgCp.isEmpty()) { + if (this.availableSrgPp.isEmpty() || this.availableSrgCp.isEmpty()) { LOG.error("initSrgTpList: ROADM SRG TerminationPoint list is empty for node {}", this); this.valid = false; return;