From 5e71e43a2a2e9089185d34e5406ee212cc478a75 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 22 Mar 2017 16:29:37 +0100 Subject: Rename module_executor -> execute_module It is a function/callable, the name should imply action, should be a verb and not a noun. Keep supporting the old name while we have PRs in-flight that use the old name. --- roles/openshift_health_checker/action_plugins/openshift_health_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_health_checker/action_plugins') diff --git a/roles/openshift_health_checker/action_plugins/openshift_health_check.py b/roles/openshift_health_checker/action_plugins/openshift_health_check.py index 8b23533c8..027abf398 100644 --- a/roles/openshift_health_checker/action_plugins/openshift_health_check.py +++ b/roles/openshift_health_checker/action_plugins/openshift_health_check.py @@ -91,7 +91,7 @@ class ActionModule(ActionBase): check_name, cls.__module__, cls.__name__, other_cls.__module__, other_cls.__name__)) - known_checks[check_name] = cls(module_executor=self._execute_module) + known_checks[check_name] = cls(execute_module=self._execute_module) return known_checks -- cgit v1.2.3 From 4b657031ff309cb8b004cd7fbd44ae479ce09432 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Wed, 22 Mar 2017 16:51:25 +0100 Subject: Test OpenShift health check loader --- .../openshift_health_checker/action_plugins/openshift_health_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roles/openshift_health_checker/action_plugins') diff --git a/roles/openshift_health_checker/action_plugins/openshift_health_check.py b/roles/openshift_health_checker/action_plugins/openshift_health_check.py index 027abf398..cf0fe19f1 100644 --- a/roles/openshift_health_checker/action_plugins/openshift_health_check.py +++ b/roles/openshift_health_checker/action_plugins/openshift_health_check.py @@ -17,7 +17,7 @@ from ansible.plugins.action import ActionBase # this callback plugin. sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) -from openshift_checks import OpenShiftCheck, OpenShiftCheckException # noqa: E402 +from openshift_checks import OpenShiftCheck, OpenShiftCheckException, load_checks # noqa: E402 class ActionModule(ActionBase): @@ -78,6 +78,8 @@ class ActionModule(ActionBase): return result def load_known_checks(self): + load_checks() + known_checks = {} known_check_classes = set(cls for cls in OpenShiftCheck.subclasses()) -- cgit v1.2.3