Refactor OLM timers management 67/97367/3
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 31 Aug 2021 09:59:25 +0000 (11:59 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Tue, 31 Aug 2021 19:56:40 +0000 (21:56 +0200)
commit7d4f682d48155fdc6c3b4ad1b1c05e58919f2655
tree0407b3625c3098dd7981cb8a2ec0f55ac52d84f2
parente84adfdd7aef4f56e1084a5471e7b46436c0ab1e
Refactor OLM timers management

OLM timer values are defined by OpenROADM whitepaper specifications.
For this reason, they are hardcoded with constants in the current code.
Though, there are at least 2 reasons to make them configurable:

1- At least one vendor product needs more than the OpenROADM whitepaper
   recommandation because it is not supporting GainLoss with
   target-output-power.

2- The OlmUtils constants are patched in functional tests to speed-up
   tests because the simulators needs less time to set the OLM up than
   real devices.

As a consequence,
- remove OlmUtils timers constants
- remove related command to patch them in tests scripts
- create a new constructor PowerMgmtImpl to allow any timers values
- modify OLM OSGi blueprint to set default values for these timers
  (Default values are the ones recommended in the OpenROADM whitepaper)
- modify lighty build to retrieve these timers from new CLI options
- adapt tests scripts and assembly ressources accordingly

JIRA: TRNSPRTPCE-496
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I71f9bdfd38c11ea3427ca2e661cd3590bc2863bf
karaf/src/main/assembly/ressources/post_install_for_tests.sh
lighty/src/main/assembly/resources/clean-start-controller.sh
lighty/src/main/java/io/lighty/controllers/tpce/Main.java
lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java
lighty/src/test/java/io/lighty/controllers/tpce/MaintTest.java
olm/src/main/java/org/opendaylight/transportpce/olm/power/PowerMgmtImpl.java
olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java
olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml
tests/build_controller.sh