Spectrum assignment skipped the last node in path 11/109311/2
authorJoakim Törnqvist <joakim.tornqvist@smartoptics.com>
Thu, 7 Dec 2023 13:50:03 +0000 (13:50 +0000)
committerJoakim Törnqvist <joakim.tornqvist@smartoptics.com>
Thu, 14 Dec 2023 13:19:17 +0000 (13:19 +0000)
commit2d4fea02cd291920e94bd36f4f32299a27508206
tree503e825122f9517e86ea53d567b1601bda9b5393
parentf67e3fd65d30dea6d5c608ccc1e829a61efb38ae
Spectrum assignment skipped the last node in path

APIImpact

Corrects an issue were the last node in a path was not
taken into account during spectrum assignment.

A path consists of a list of source/destination node pairs,
eg [(N1,N2) (N2,N3) (N3,N4)].

Consider this network: [A] ----- [B],  were A and B are ROADMs.
During path computation the above example may produce a path
such as:
[(A-SRG1, A-DEG1) (A-DEG1, B-DEG1) (B-DEG1, B-SRG1)]

The bug caused the code to skip checking for available
spectrum on B-SRG1.

This was due to spectrum assignment is only processed
in the A-Z direction, combined with an iteration only
taking the source node into account.

JIRA: TRNSPRTPCE-772
Change-Id: Ia0822a1cdb0e4b5f67d9c9675e1203f0a0746ef6
Signed-off-by: Joakim Törnqvist <joakim.tornqvist@smartoptics.com>
pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java