Skip to content

Commit

Permalink
encapsulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Miryam-Schwartz committed Nov 28, 2024
1 parent 982563e commit e49115c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def full_analysis(self):
self.get_last_iterations_time_stats(),
)
)

dataframes_for_pdf.append(
(
f"{self.telemetry_type} "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ def full_analysis(self):
Returns a list of all the graphs created and their title
"""
self.print_fabric_size()
fabric_info = (self.get_fabric_size())
fabric_info = self.get_fabric_size()
tmp_df = [("Fabric info", fabric_info)]
return [], tmp_df, []
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def plot_link_flapping_last_week(self):
def full_analysis(self):
link_flapping_last_week = self.get_link_flapping_last_week()
images, _, _ = super().full_analysis()
df = [("Link Flapping past week", link_flapping_last_week,)]
df = [("Link Flapping last week", link_flapping_last_week,)]
return images, df, []
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# pylint: disable=missing-module-docstring


from plugins.ufm_log_analyzer_plugin.src.loganalyze.log_analyzers.ibdiagnet_log_analyzer import IBDIAGNETLogAnalyzer
from plugins.ufm_log_analyzer_plugin.src.loganalyze.log_analyzers.ibdiagnet_log_analyzer\
import IBDIAGNETLogAnalyzer


class UFMTopAnalyzer:
Expand All @@ -32,11 +33,12 @@ def full_analysis_all_analyzers(self):
lists_to_add = []
for analyzer in self._analyzers:
tmp_images_list, tmp_dataframes, tmp_lists = analyzer.full_analysis()
graphs_and_titles.extend(tmp_images_list) if tmp_images_list else None
dataframes.extend(tmp_dataframes) if tmp_dataframes else None
lists_to_add.extend(tmp_lists) if tmp_lists else None
graphs_and_titles.extend(tmp_images_list)
dataframes.extend(tmp_dataframes)
lists_to_add.extend(tmp_lists)

has_ibdiagnet_analyzer = any(isinstance(instance, IBDIAGNETLogAnalyzer) for instance in self._analyzers)
has_ibdiagnet_analyzer = any(isinstance(instance, IBDIAGNETLogAnalyzer) \
for instance in self._analyzers)
if not has_ibdiagnet_analyzer:
dataframes.append(("Fabric info", ("No Fabric Info found")))

Expand Down

0 comments on commit e49115c

Please sign in to comment.