Fix bug in OLM during spanloss computation 77/98077/2
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 21 Oct 2021 08:24:51 +0000 (10:24 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Fri, 28 Jan 2022 08:29:49 +0000 (09:29 +0100)
commitd7d4a8a07412ddbfdde160871ba39d0a71023725
tree3895ed946b66f63dcf17c28d1a8d18ce1f797e00
parent3778a0e87f0d508fa8c6e057b7ccaf1a1fbc57a6
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