summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-02-20 14:54:39 -0500
committerSteve Milner <smilner@redhat.com>2017-02-22 11:26:23 -0500
commitde8d10d8a6eb34c4f6821353345c7baadc1f3b60 (patch)
tree34c08a52aa9f45a4fcb404d9ade442334e8e32e0
parent02a053bf0f3cdeb76753dfb37bb060eef18452d3 (diff)
downloadopenshift-de8d10d8a6eb34c4f6821353345c7baadc1f3b60.tar.gz
openshift-de8d10d8a6eb34c4f6821353345c7baadc1f3b60.tar.bz2
openshift-de8d10d8a6eb34c4f6821353345c7baadc1f3b60.tar.xz
openshift-de8d10d8a6eb34c4f6821353345c7baadc1f3b60.zip
Renamed NotContainerized to NotContainerizedMixin and dropped no-member
-rw-r--r--roles/openshift_health_checker/openshift_checks/__init__.py1
-rw-r--r--roles/openshift_health_checker/openshift_checks/mixins.py9
-rw-r--r--roles/openshift_health_checker/openshift_checks/package_availability.py4
-rw-r--r--roles/openshift_health_checker/openshift_checks/package_update.py4
-rw-r--r--roles/openshift_health_checker/openshift_checks/package_version.py4
5 files changed, 10 insertions, 12 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/__init__.py b/roles/openshift_health_checker/openshift_checks/__init__.py
index c31242624..2c70438c9 100644
--- a/roles/openshift_health_checker/openshift_checks/__init__.py
+++ b/roles/openshift_health_checker/openshift_checks/__init__.py
@@ -50,6 +50,7 @@ class OpenShiftCheck(object):
@classmethod
def subclasses(cls):
"""Returns a generator of subclasses of this class and its subclasses."""
+ # AUDIT: no-member makes sense due to this having a metaclass
for subclass in cls.__subclasses__(): # pylint: disable=no-member
yield subclass
for subclass in subclass.subclasses():
diff --git a/roles/openshift_health_checker/openshift_checks/mixins.py b/roles/openshift_health_checker/openshift_checks/mixins.py
index 4029fba62..657e15160 100644
--- a/roles/openshift_health_checker/openshift_checks/mixins.py
+++ b/roles/openshift_health_checker/openshift_checks/mixins.py
@@ -2,17 +2,14 @@
from openshift_checks import get_var
-class NotContainerized(object):
+class NotContainerizedMixin(object):
"""Mixin for checks that are only active when not in containerized mode."""
@classmethod
def is_active(cls, task_vars):
return (
- # This mixin is meant to be used with subclasses of
- # OpenShiftCheck. Pylint disables this by default on mixins,
- # though it relies on the class name ending in 'mixin'.
- # pylint: disable=no-member
- super(NotContainerized, cls).is_active(task_vars) and
+ # This mixin is meant to be used with subclasses of OpenShiftCheck.
+ super(NotContainerizedMixin, cls).is_active(task_vars) and
not cls.is_containerized(task_vars)
)
diff --git a/roles/openshift_health_checker/openshift_checks/package_availability.py b/roles/openshift_health_checker/openshift_checks/package_availability.py
index 8faeef5ee..771123d61 100644
--- a/roles/openshift_health_checker/openshift_checks/package_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/package_availability.py
@@ -1,9 +1,9 @@
# pylint: disable=missing-docstring
from openshift_checks import OpenShiftCheck, get_var
-from openshift_checks.mixins import NotContainerized
+from openshift_checks.mixins import NotContainerizedMixin
-class PackageAvailability(NotContainerized, OpenShiftCheck):
+class PackageAvailability(NotContainerizedMixin, OpenShiftCheck):
"""Check that required RPM packages are available."""
name = "package_availability"
diff --git a/roles/openshift_health_checker/openshift_checks/package_update.py b/roles/openshift_health_checker/openshift_checks/package_update.py
index 86b7b6245..c5a226954 100644
--- a/roles/openshift_health_checker/openshift_checks/package_update.py
+++ b/roles/openshift_health_checker/openshift_checks/package_update.py
@@ -1,9 +1,9 @@
# pylint: disable=missing-docstring
from openshift_checks import OpenShiftCheck
-from openshift_checks.mixins import NotContainerized
+from openshift_checks.mixins import NotContainerizedMixin
-class PackageUpdate(NotContainerized, OpenShiftCheck):
+class PackageUpdate(NotContainerizedMixin, OpenShiftCheck):
"""Check that there are no conflicts in RPM packages."""
name = "package_update"
diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py
index 7fa09cbfd..2e9d07deb 100644
--- a/roles/openshift_health_checker/openshift_checks/package_version.py
+++ b/roles/openshift_health_checker/openshift_checks/package_version.py
@@ -1,9 +1,9 @@
# pylint: disable=missing-docstring
from openshift_checks import OpenShiftCheck, get_var
-from openshift_checks.mixins import NotContainerized
+from openshift_checks.mixins import NotContainerizedMixin
-class PackageVersion(NotContainerized, OpenShiftCheck):
+class PackageVersion(NotContainerizedMixin, OpenShiftCheck):
"""Check that available RPM packages match the required versions."""
name = "package_version"