Fix bug in OLM during spanloss computation 23/98023/7
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 21 Oct 2021 08:24:51 +0000 (10:24 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Fri, 22 Oct 2021 13:29:54 +0000 (13:29 +0000)
commit220a7ba4f55d6c0ab5b1605b4b9d26cbcb4dcd9b
tree2e855a573611389bf8a39f338bf1a835d5192ca0
parent053ee6b8dce2f8d6ce067e2added3b31716eacb7
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
olm/src/main/java/org/opendaylight/transportpce/olm/service/OlmPowerServiceImpl.java
olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils221.java