diff --git a/hotsos/core/ycheck/engine/properties/requires/types/pebble.py b/hotsos/core/ycheck/engine/properties/requires/types/pebble.py index b3ee4418a..3f973927c 100644 --- a/hotsos/core/ycheck/engine/properties/requires/types/pebble.py +++ b/hotsos/core/ycheck/engine/properties/requires/types/pebble.py @@ -24,7 +24,7 @@ class YRequirementTypePebble(service_manager_common.ServiceManagerTypeBase): override_autoregister = True default_op = 'eq' - def _check_item_settings(self, svc, svc_obj, settings, cache_info, + def _check_item_settings(self, svc_obj, settings, cache_info, all_items): processes = None if isinstance(settings, str): @@ -46,8 +46,8 @@ def _check_item_settings(self, svc, svc_obj, settings, cache_info, "- %s", ', '.join(processes)) return False - cache_info[svc]['ops'] = self.ops_to_str(ops) - return self.self.apply_ops(ops, input=svc_obj.state) + cache_info[svc_obj.name]['ops'] = self.ops_to_str(ops) + return self.apply_ops(ops, opinput=svc_obj.state) @property def items_to_check(self): diff --git a/hotsos/core/ycheck/engine/properties/requires/types/service_manager_common.py b/hotsos/core/ycheck/engine/properties/requires/types/service_manager_common.py index 400091678..a51655aea 100644 --- a/hotsos/core/ycheck/engine/properties/requires/types/service_manager_common.py +++ b/hotsos/core/ycheck/engine/properties/requires/types/service_manager_common.py @@ -37,7 +37,7 @@ def _result(self): if settings is None: continue - _result = self._check_item_settings(svc, svc_obj, settings, + _result = self._check_item_settings(svc_obj, settings, cache_info, items) if not _result: # bail on first fail diff --git a/hotsos/core/ycheck/engine/properties/requires/types/systemd.py b/hotsos/core/ycheck/engine/properties/requires/types/systemd.py index 8dabd1a2c..aa0e3568a 100644 --- a/hotsos/core/ycheck/engine/properties/requires/types/systemd.py +++ b/hotsos/core/ycheck/engine/properties/requires/types/systemd.py @@ -73,7 +73,7 @@ def _check_service(self, svc, ops, started_after=None): return self.apply_ops(ops, opinput=svc.state) - def _check_item_settings(self, svc, svc_obj, settings, cache_info, + def _check_item_settings(self, svc_obj, settings, cache_info, all_items): # pylint: disable=duplicate-code processes = None @@ -100,7 +100,7 @@ def _check_item_settings(self, svc, svc_obj, settings, cache_info, "- %s", ', '.join(processes)) return False - cache_info[svc]['ops'] = self.ops_to_str(ops) + cache_info[svc_obj.name]['ops'] = self.ops_to_str(ops) return self._check_service(svc_obj, ops, started_after=started_after_obj) diff --git a/hotsos/plugin_extensions/openstack/agent/events.py b/hotsos/plugin_extensions/openstack/agent/events.py index 239912a6d..5db44e30a 100644 --- a/hotsos/plugin_extensions/openstack/agent/events.py +++ b/hotsos/plugin_extensions/openstack/agent/events.py @@ -325,6 +325,7 @@ class ApparmorCallback(OpenstackEventCallbackBase): event_names = ['nova', 'neutron'] def __call__(self, event): + # pylint: disable=duplicate-code results = [{'date': f"{r.get(1)} {r.get(2)}", 'time': r.get(3), 'key': r.get(4)} for r in event.results] diff --git a/hotsos/plugin_extensions/openvswitch/event_checks.py b/hotsos/plugin_extensions/openvswitch/event_checks.py index 1c33d39a0..58894dbe4 100644 --- a/hotsos/plugin_extensions/openvswitch/event_checks.py +++ b/hotsos/plugin_extensions/openvswitch/event_checks.py @@ -54,6 +54,7 @@ class OVSEventCallbackDALR(OpenvSwitchEventCallbackBase): event_names = ['deferred-action-limit-reached'] def __call__(self, event): + # pylint: disable=duplicate-code results = [{'date': f"{r.get(1)} {r.get(2)}", 'time': r.get(3), 'key': r.get(4)} for r in event.results]