summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/openshift_checks/__init__.py
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-07-20 22:25:47 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-08-02 14:06:37 -0400
commitbf0828bc0f2e3088df20abc77e30a162595e1c22 (patch)
treea46617defefce2cf180666ad441451f54d418704 /roles/openshift_health_checker/openshift_checks/__init__.py
parentf6e0126c3cda6622fc2371b3b603108b94ed9d39 (diff)
downloadopenshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.gz
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.bz2
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.xz
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.zip
openshift_checks: add property to track 'changed'
Introduced the 'changed' property for checks that can make changes to track whether they did or not. Rather than the check's own logic having to track this and include it in the result hash, just set the property and have the action plugin insert it in the result hash after running (even if there is an exception). Cleared out a lot of crufty "changed: false" hash entries.
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/__init__.py')
-rw-r--r--roles/openshift_health_checker/openshift_checks/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/__init__.py b/roles/openshift_health_checker/openshift_checks/__init__.py
index 85cbc6224..5d289e522 100644
--- a/roles/openshift_health_checker/openshift_checks/__init__.py
+++ b/roles/openshift_health_checker/openshift_checks/__init__.py
@@ -34,6 +34,8 @@ class OpenShiftCheck(object):
self._execute_module = execute_module
self.task_vars = task_vars or {}
self.tmp = tmp
+ # set True when the check makes a change to the host so it can be reported to the user:
+ self.changed = False
@abstractproperty
def name(self):