diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/base_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/base_analyzer.py index a95ca640..cd9885dc 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/base_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/base_analyzer.py @@ -205,14 +205,11 @@ def __init__( def _remove_empty_lines_from_csv(input_file): temp_file = input_file + ".temp" - with ( - open( + with open( input_file, "r", newline="", encoding=DataConstants.UTF8ENCODING - ) as infile, - open( + ) as infile, open( temp_file, "w", newline="", encoding=DataConstants.UTF8ENCODING - ) as outfile, - ): + ) as outfile: reader = csv.reader(infile) writer = csv.writer(outfile) diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/console_log_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/console_log_analyzer.py index bdb80583..0d4e1144 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/console_log_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/console_log_analyzer.py @@ -31,7 +31,7 @@ def __init__( self._funcs_for_analysis = { self.print_exceptions_per_time_count, self.print_exceptions, - } + } @staticmethod def _extract_ufm_version(logs_csvs): diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/events_log_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/events_log_analyzer.py index e4a4262a..954fc48e 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/events_log_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/events_log_analyzer.py @@ -153,11 +153,3 @@ def plot_link_up_down_count_per_aggregation_time(self): self._save_pivot_data_in_bars( pivot_links_data, "Time", "Number of Events", "Link up/down events", "Event" ) - - def full_analysis(self): - super().full_analysis() - df_to_add = ( - "More than 5 events burst over a minute", - self.get_critical_event_bursts(), - ) - self._dataframes_for_pdf.append(df_to_add) diff --git a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet_log_analyzer.py b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet_log_analyzer.py index 1e03e2e7..d90cd951 100644 --- a/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet_log_analyzer.py +++ b/plugins/ufm_log_analyzer_plugin/src/loganalyze/log_analyzers/ibdiagnet_log_analyzer.py @@ -20,7 +20,10 @@ class IBDIAGNETLogAnalyzer(BaseAnalyzer): def __init__(self, logs_csvs: List[str], hours: int, dest_image_path): super().__init__(logs_csvs, hours, dest_image_path, sort_timestamp=False) - self._funcs_for_analysis = {self.save_fabric_size} + self._funcs_for_analysis = { + self.save_fabric_size, + self.print_fabric_size, + } def print_fabric_size(self): fabric_info = self.get_fabric_size() @@ -32,7 +35,3 @@ def get_fabric_size(self): def save_fabric_size(self): fabric_info = self.get_fabric_size() self._dataframes_for_pdf.append(("Fabric info", fabric_info)) - - def full_analysis(self): - super().full_analysis() - self.print_fabric_size()