Make PCE optical node validation fail when no PPs are available 57/88857/5
authorJonas Mårtensson <jonas.martensson@ri.se>
Thu, 2 Apr 2020 15:22:46 +0000 (17:22 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Wed, 13 May 2020 10:38:16 +0000 (12:38 +0200)
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 <jonas.martensson@ri.se>
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java

index cdc764fd8dfac642449f67f52f358895d215dc52..63f2bffe0a518ec7ed49a27174695535396b22e4 100644 (file)
@@ -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;