thoth.adviser.boots package

Submodules

thoth.adviser.boots.cve_timestamp module

A boot to provide information about the last CVE update.

class thoth.adviser.boots.cve_timestamp.CveTimestampBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to provide information about the last CVE update.

run() → None[source]

Check CVE timestamp and provide it to users.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, once, always.

thoth.adviser.boots.environment_info module

A boot to notify about environment used.

class thoth.adviser.boots.environment_info.EnvironmentInfoBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about environment used.

run() → None[source]

Notify about environment used.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

thoth.adviser.boots.fully_specified_environment module

A boot to check for fully specified environment.

class thoth.adviser.boots.fully_specified_environment.FullySpecifiedEnvironment(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check for fully specified environment.

run() → None[source]

Check for version clash in packages.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

thoth.adviser.boots.labels module

A boot to notify about labels used during the resolution.

class thoth.adviser.boots.labels.LabelsBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about labels used during the resolution.

run() → None[source]

Notify about labels used during the resolution process..

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if labels are used.

thoth.adviser.boots.pipfile_hash module

A boot that checks for Pipfile hash and reports any mismatch to users..

class thoth.adviser.boots.pipfile_hash.PipfileHashBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks for Pipfile hash and reports any mismatch to users..

run() → None[source]

Check for platform configured and adjust to the default one if not provided by user.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

thoth.adviser.boots.platform module

A boot to check if recommendation is targeting a supported platform.

class thoth.adviser.boots.platform.PlatformBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check if a supported platform is used.

We could check this based on the database entries, but as this will change rarely, we can hardcode supported platforms here.

run() → None[source]

Check if GPU enabled recommendations should be done.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always on unsupported platform.

thoth.adviser.boots.prescription_release module

A boot that adds info about prescription release.

class thoth.adviser.boots.prescription_release.PrescriptionReleaseBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

Add information about prescription release used.

run() → None[source]

Add information about prescription release used.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if a prescription is used.

thoth.adviser.boots.python_version module

A boot to check Python version configuration used in adviser.

class thoth.adviser.boots.python_version.PythonVersionBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks Python3 configuration used by user.

run() → None[source]

Check Python configuration used by user.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always for adviser.

thoth.adviser.boots.rhel_version module

A boot to adjust RHEL version to its major version.

class thoth.adviser.boots.rhel_version.RHELVersionBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that changes version of RHEL used.

RHEL guarantees ABI compatibility across major minor releases.

run() → None[source]

Discard any minor release in RHEL.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

thoth.adviser.boots.solved_software_environment module

A boot to check for solved software environment before running any resolution.

class thoth.adviser.boots.solved_software_environment.SolvedSoftwareEnvironmentBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check for solved software environment before running any resolution.

run() → None[source]

Check for version clash in packages.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

thoth.adviser.boots.solvers_configured module

A boot to notify about runtime environments not supported by solvers enabled in a deployment.

class thoth.adviser.boots.solvers_configured.SolversConfiguredBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about runtime environments not supported by solvers enabled in a deployment.

run() → None[source]

Inform about runtime environment that is not backed up by a solver.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if users use runtime environments not matching solvers in the configmap.

thoth.adviser.boots.thoth_s2i module

A boot that recommends to use Thoth’s s2i if users do not use it.

class thoth.adviser.boots.thoth_s2i.ThothS2IBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that notifies about missing observations.

run() → None[source]

Check for no observations made on the given state.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[Any, Any], None, None][source]

Include this boot in adviser if Thoth s2i is not used..

thoth.adviser.boots.thoth_s2i_info module

A boot that adds information about Thoth s2i used.

class thoth.adviser.boots.thoth_s2i_info.ThothS2IInfoBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that adds information about Thoth s2i used.

CONFIGURATION_DEFAULT = {'link': None, 'message': None, 'type': 'INFO'}
CONFIGURATION_SCHEMA = <Schema({'message': <class 'str'>, 'link': <class 'str'>, 'type': <class 'str'>}, extra=PREVENT_EXTRA, required=False) object>
run() → None[source]

Add information about the base image used to justification.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[Any, Any], None, None][source]

Include this boot in adviser if Thoth s2i is used..

thoth.adviser.boots.ubi module

A boot to remap UBI to RHEL.

class thoth.adviser.boots.ubi.UbiBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

Remap UBI to RHEL.

As UBI has ABI compatibility with RHEL, remap any UBI to RHEL.

run() → None[source]

Remap UBI to RHEL as Thoth keeps track of RHEL and UBI is ABI compatible.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if UBI is used.

thoth.adviser.boots.version_check module

A boot to check for fully specified environment.

class thoth.adviser.boots.version_check.VersionCheckBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks if versions are too lax.

run() → None[source]

Check if versions are not too lax.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

Module contents

Boot units implemented in adviser.

class thoth.adviser.boots.ThothSearchBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING, search_url: str = 'https://thoth-station.ninja/search/{document_id}/summary', document_id: str = 'UNKNOWN')[source]

Bases: thoth.adviser.boot.Boot

A boot to provide a link to Thoth search showing results in a UI.

run() → None[source]

Provide a link to Thoth search visualizing results.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, once, always.

class thoth.adviser.boots.PlatformBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check if a supported platform is used.

We could check this based on the database entries, but as this will change rarely, we can hardcode supported platforms here.

run() → None[source]

Check if GPU enabled recommendations should be done.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always on unsupported platform.

class thoth.adviser.boots.CveTimestampBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to provide information about the last CVE update.

run() → None[source]

Check CVE timestamp and provide it to users.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, once, always.

class thoth.adviser.boots.LabelsBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about labels used during the resolution.

run() → None[source]

Notify about labels used during the resolution process..

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if labels are used.

class thoth.adviser.boots.PipfileHashBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks for Pipfile hash and reports any mismatch to users..

run() → None[source]

Check for platform configured and adjust to the default one if not provided by user.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

class thoth.adviser.boots.VersionCheckBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks if versions are too lax.

run() → None[source]

Check if versions are not too lax.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

class thoth.adviser.boots.ThothS2IBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that notifies about missing observations.

run() → None[source]

Check for no observations made on the given state.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[Any, Any], None, None][source]

Include this boot in adviser if Thoth s2i is not used..

class thoth.adviser.boots.ThothS2IInfoBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that adds information about Thoth s2i used.

CONFIGURATION_DEFAULT = {'link': None, 'message': None, 'type': 'INFO'}
CONFIGURATION_SCHEMA = <Schema({'message': <class 'str'>, 'link': <class 'str'>, 'type': <class 'str'>}, extra=PREVENT_EXTRA, required=False) object>
run() → None[source]

Add information about the base image used to justification.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[Any, Any], None, None][source]

Include this boot in adviser if Thoth s2i is used..

class thoth.adviser.boots.UbiBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

Remap UBI to RHEL.

As UBI has ABI compatibility with RHEL, remap any UBI to RHEL.

run() → None[source]

Remap UBI to RHEL as Thoth keeps track of RHEL and UBI is ABI compatible.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if UBI is used.

class thoth.adviser.boots.PythonVersionBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that checks Python3 configuration used by user.

run() → None[source]

Check Python configuration used by user.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always for adviser.

class thoth.adviser.boots.EnvironmentInfoBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about environment used.

run() → None[source]

Notify about environment used.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

class thoth.adviser.boots.SolvedSoftwareEnvironmentBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check for solved software environment before running any resolution.

run() → None[source]

Check for version clash in packages.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

class thoth.adviser.boots.RHELVersionBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot that changes version of RHEL used.

RHEL guarantees ABI compatibility across major minor releases.

run() → None[source]

Discard any minor release in RHEL.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.

class thoth.adviser.boots.SolversConfiguredBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to notify about runtime environments not supported by solvers enabled in a deployment.

run() → None[source]

Inform about runtime environment that is not backed up by a solver.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if users use runtime environments not matching solvers in the configmap.

class thoth.adviser.boots.PrescriptionReleaseBoot(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

Add information about prescription release used.

run() → None[source]

Add information about prescription release used.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self if a prescription is used.

class thoth.adviser.boots.FullySpecifiedEnvironment(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.boot.Boot

A boot to check for fully specified environment.

run() → None[source]

Check for version clash in packages.

classmethod should_include(builder_context: PipelineBuilderContext) → Generator[Dict[str, Any], None, None][source]

Register self, always.