Refactor OLM timers management 99/99499/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 31 Aug 2021 09:59:25 +0000 (11:59 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Thu, 27 Jan 2022 15:48:32 +0000 (16:48 +0100)
commit0ffc4ae204fc17e609f5f119448e4de4b350c47b
tree2b89320e45d5f0238e3ecca9233c7f25a074a597
parent64d89fbb41b49d40b9f507b0741859041775c0bc
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