Add global status for hosts
As a support for OpenScap reports and other future types of reports, we need to add a global status to hosts.
Host will have one generic overall status (error, warning, ok) and it's transitions will be caused by other specific statuses. Statuses (e.g. puppet status) will be extracted to separate entity and will be
changed when puppet report is imported (by PuppetReportImporter). This means we need a way to register new report types and importers from plugin (exactly the same we have for facts now). Reports will probably only differ in metrics and their own statuses, therefore we should make metrics optional and mapping to global status should be different per specific status.
- As a developer I want to have global host state with developer API allowing me to change it easily.
- As a developer I want to register new host status type and define mapping between it and host global state.
- As a user I want to be able to search based on host global status.
- As a user I want to see the overall host status derived from all report types statuses.
Fixes #10782 - global host statusIntroduce new global host status that is composed of host substatuses.
Each substatus defines a mapping to the global one which can result in
Plugins can add their own substatuses. These are automatically
propagated also to API.
Thanks to Tomas Strachota who wrote the original code.