At the moment reapply evaluation is performed only for hardcoded apps.
This behavior needs to be changed.
Allow apps to specify what triggers they subscribe to in their metadata
file.
In sysinv a trigger is a dictionary composed of at least the 'type'
field and other optional fields.
Easy use of filters on the triggers by specifying key:value pairs to be
searched in the trigger information.
Keep a map between sysinv triggers type and the trigger types specified
in the metadata.
Existing triggers are: host-delete, runtime-apply-puppet,
platform-update, unlock, force-unlock.
Add new triggers: host-add, host-delete, host-reinstall, lock, swact,
force-lock, force-swact, system-modify.
Introduced a lifeycle semantic check hook for reapply evaluation where
apps can run complex logic to reject the evaluation.
Modified unit tests. These are basic unit tests querying the number of
calls.
Unsupported unit test for host-add.
Missing unit test for system-modify.
Tests: AIO-SX, AIO-DX
Triggering the events, events are seen in the logs as expected, apps
respond to events as specified in their metadata.
To keep backwards compatibility, this work depends on updating the
metadata file for each of the 5 apps that use the existing triggers.
Depends-On: Ia7bbca906e343ffffa019885a790befdf5ccb565
Depends-On: I588648090e82ac573db5112a2704d22fa45a049f
Depends-On: Ie02743cdf056dda3feb66911c74f9dabe69d98dd
Depends-On: I4778c6c8232fffb5fafca95b450e590fbb1b0f64
Depends-On: I0a76ef10fe3958634d714f1484d79763f98a0d4e
Story: 2007960
Task: 41760
Closes-Bug: 1884770
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I023eb3bce9061e0ccfcf10ebeeaef91bcb39cff1