diff options
author | Luke Meyer <lmeyer@redhat.com> | 2017-06-16 15:36:06 -0400 |
---|---|---|
committer | Luke Meyer <lmeyer@redhat.com> | 2017-07-25 13:23:58 -0400 |
commit | 3f3f87b7982b570ffb976865e3eace2d36960bd4 (patch) | |
tree | cd469bc7ca6b1047b75a69642383f6b9f7305251 /roles/openshift_health_checker/openshift_checks/package_availability.py | |
parent | 5b0525f509906a43071f824b02ceb8d170c300ed (diff) | |
download | openshift-3f3f87b7982b570ffb976865e3eace2d36960bd4.tar.gz openshift-3f3f87b7982b570ffb976865e3eace2d36960bd4.tar.bz2 openshift-3f3f87b7982b570ffb976865e3eace2d36960bd4.tar.xz openshift-3f3f87b7982b570ffb976865e3eace2d36960bd4.zip |
openshift_checks: improve comments/names
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/package_availability.py')
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/package_availability.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/package_availability.py b/roles/openshift_health_checker/openshift_checks/package_availability.py index 0dd2b1286..a67b68d1b 100644 --- a/roles/openshift_health_checker/openshift_checks/package_availability.py +++ b/roles/openshift_health_checker/openshift_checks/package_availability.py @@ -1,4 +1,5 @@ -# pylint: disable=missing-docstring +"""Check that required RPM packages are available.""" + from openshift_checks import OpenShiftCheck, get_var from openshift_checks.mixins import NotContainerizedMixin @@ -11,6 +12,7 @@ class PackageAvailability(NotContainerizedMixin, OpenShiftCheck): @classmethod def is_active(cls, task_vars): + """Run only when yum is the package manager as the code is specific to it.""" return super(PackageAvailability, cls).is_active(task_vars) and task_vars["ansible_pkg_mgr"] == "yum" def run(self, tmp, task_vars): @@ -29,6 +31,7 @@ class PackageAvailability(NotContainerizedMixin, OpenShiftCheck): @staticmethod def master_packages(rpm_prefix): + """Return a list of RPMs that we expect a master install to have available.""" return [ "{rpm_prefix}".format(rpm_prefix=rpm_prefix), "{rpm_prefix}-clients".format(rpm_prefix=rpm_prefix), @@ -44,6 +47,7 @@ class PackageAvailability(NotContainerizedMixin, OpenShiftCheck): @staticmethod def node_packages(rpm_prefix): + """Return a list of RPMs that we expect a node install to have available.""" return [ "{rpm_prefix}".format(rpm_prefix=rpm_prefix), "{rpm_prefix}-node".format(rpm_prefix=rpm_prefix), |