Fix bug in OLM during spanloss computation 78/98078/2
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 21 Oct 2021 08:24:51 +0000 (10:24 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Tue, 9 Nov 2021 11:06:57 +0000 (11:06 +0000)
commit5aa2df61d1ad873eab70f9a69fbd18f47838303a
tree711006d7e0c6501a6e1215009883d40d8786325f
parentd9bed230b53c87b4ae3fc983a056637dd7994065
Fix bug in OLM during spanloss computation

Prevent from getting NPE when OTS interface terminating the
roadm-to-roadm link under spanloss determination does not exist in the
device.
- remove invocation of getOtsInterfaceName method on an OtsPmHolder null
  object, at the origin of the NPE thrown.
  This check is superfluous since OtsPmHolder.getOtsInterfaceName() can
  not be null if OtsPmHolder is not null.
- fix typo on OtsPmHolder variable names
- adapt LOG messages consequently

JIRA: TRNSPRTPCE-172
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: Idec6fac25a33c7748ad4996e01211e04667b4fd5
(cherry picked from commit 220a7ba4f55d6c0ab5b1605b4b9d26cbcb4dcd9b)
olm/src/main/java/org/opendaylight/transportpce/olm/service/OlmPowerServiceImpl.java
olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils221.java