thoth-station/analyzer

Capture OS name, OS version and kernel information in output of analyzers

Closed this issue · 1 comments

Capture OS name, OS version and kernel information in metadata (result print function):

def print_command_result(click_ctx: click.core.Command,
result: typing.Union[dict, list], analyzer: str,
analyzer_version: str, output: str = None,
pretty: bool = True) -> None:
"""Print or submit results, nicely if requested."""
metadata = {

this should do the trick for most relevant information:

import platform
# ...
result["metadata"]["platform"] = {
        "architecture": platform.architecture(),
        "machine": platform.machine(),
        "node": platform.node(),
        "platform": platform.platform(),
        "processor": platform.processor(),
        "release": platform.release(),
        "version": platform.version(),
    }

This way we will capture relevant information for analyzer results (e.g. solver) transparently.

The kernel info is not necessary for all the analyzers.