package_version.py 698 B

1234567891011121314151617181920
  1. # pylint: disable=missing-docstring
  2. from openshift_checks import OpenShiftCheck, get_var
  3. from openshift_checks.mixins import NotContainerizedMixin
  4. class PackageVersion(NotContainerizedMixin, OpenShiftCheck):
  5. """Check that available RPM packages match the required versions."""
  6. name = "package_version"
  7. tags = ["preflight"]
  8. def run(self, tmp, task_vars):
  9. rpm_prefix = get_var(task_vars, "openshift", "common", "service_type")
  10. openshift_release = get_var(task_vars, "openshift_release")
  11. args = {
  12. "prefix": rpm_prefix,
  13. "version": openshift_release,
  14. }
  15. return self.module_executor("aos_version", args, tmp, task_vars)