Error in TAPI creating frequency ranges 38/112438/25
authorJoakim Törnqvist <joakim.tornqvist@smartoptics.com>
Wed, 3 Jul 2024 10:27:16 +0000 (12:27 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Fri, 6 Sep 2024 20:27:20 +0000 (22:27 +0200)
commit2d17c9909f309efd566e98391092bc353ae7effe
tree24f24becec53c5f09e6230910208e0526219298f
parent996ee30a14c1db189d773fb72c2adb78eb226596
Error in TAPI creating frequency ranges

When an OpenROADM service is converted to TAPI, an exception
(ArrayIndexOutOfBoundsException) is thrown.
A byte array (size 96) was used when the code was actually expecting
size 768 (i.e. 96 x 8), when trying to create a Map<Double, Double>
with frequency ranges.

The use of method getFreqMapFromBitSet in ConvertORToTapiTopology
has been replaced with the package
org.opendaylight.transportpce.tapi.frequency.

A refactored version of getFreqMapFromBitSet can be found in the class
org.opendaylight.transportpce.tapi.frequency.NumericFrequency.

JIRA: TRNSPRTPCE-802
Change-Id: I423507decaae38b44d9f6968882179c3ec1b11d4
Signed-off-by: Joakim Törnqvist <joakim.tornqvist@smartoptics.com>
tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/ConvertORToTapiTopology.java
tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORToTapiTopologyTest.java [new file with mode: 0644]