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_version.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_version.py')
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/package_version.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py index 204752bd0..ab4295770 100644 --- a/roles/openshift_health_checker/openshift_checks/package_version.py +++ b/roles/openshift_health_checker/openshift_checks/package_version.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-docstring +"""Check that available RPM packages match the required versions.""" from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var from openshift_checks.mixins import NotContainerizedMixin @@ -107,6 +107,7 @@ class PackageVersion(NotContainerizedMixin, OpenShiftCheck): raise OpenShiftCheckException(msg.format(openshift_version)) def get_openshift_version(self, task_vars): + """Return received image tag as a normalized X.Y minor version string.""" openshift_version = get_var(task_vars, "openshift_image_tag") if openshift_version and openshift_version[0] == 'v': openshift_version = openshift_version[1:] @@ -114,6 +115,7 @@ class PackageVersion(NotContainerizedMixin, OpenShiftCheck): return self.parse_version(openshift_version) def parse_version(self, version): + """Return a normalized X.Y minor version string.""" components = version.split(".") if not components or len(components) < 2: msg = "An invalid version of OpenShift was found for this host: {}" |