From d11ac709726fb80e11bba4abebdd7aa3cae3eefc Mon Sep 17 00:00:00 2001 From: Sachin Date: Thu, 13 Oct 2022 10:48:17 +0530 Subject: [PATCH] Deprecate insights.core.scannable & engine_log parser (#3541) The following will be deprecated after insights-core-3.2.25: * insights.core.scannable: Better use the `core.Parser` with filter. * insights.parsers.engine_log: Use insights.parsers.ovirt_engine_log instead. Signed-off-by: Sachin Patil --- insights/core/__init__.py | 3 +++ insights/parsers/engine_log.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/insights/core/__init__.py b/insights/core/__init__.py index f6a616f647..22a1fe35ed 100644 --- a/insights/core/__init__.py +++ b/insights/core/__init__.py @@ -866,6 +866,9 @@ def has_fcoe_edd(line): strings or False). """ + def __init__(self, *args, **kwargs): + deprecated(Scannable, "Please use the :class:`insights.core.Parser` instead", "3.2.25") + super(Scannable, self).__init__(*args, **kwargs) @classmethod def _scan(cls, result_key, scanner): diff --git a/insights/parsers/engine_log.py b/insights/parsers/engine_log.py index bca9dba481..6218aa34c9 100644 --- a/insights/parsers/engine_log.py +++ b/insights/parsers/engine_log.py @@ -39,5 +39,5 @@ class EngineLog(LogFileOutput): Provide access to ovirt engine logs using the LogFileOutput parser class. """ def __init__(self, *args, **kwargs): - deprecated(EngineLog, "Import EngineLog from insights.parsers.ovirt_engine_log instead") + deprecated(EngineLog, "Import EngineLog from insights.parsers.ovirt_engine_log instead", "3.2.25") super(EngineLog, self).__init__(*args, **kwargs)