matrice de routage ajouté | reformatage
This commit is contained in:
21
Parseurs_logs_Switch/src/main.py
Normal file
21
Parseurs_logs_Switch/src/main.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
from scripts.mermaid import NetworkAnalyzer
|
||||
from scripts.parse_uplinks import UplinkReportGenerator
|
||||
|
||||
def main():
|
||||
"""Fonction principale du programme d'analyse."""
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python main.py <fichier_log_coeur>")
|
||||
sys.exit(1)
|
||||
|
||||
coeur_log_filename = sys.argv[1]
|
||||
coeur_log_filename = os.path.basename(coeur_log_filename)
|
||||
|
||||
UplinkReportGenerator().generate_report(coeur_log_filename)
|
||||
NetworkAnalyzer(base_dir=Path(__file__).parent).analyze(coeur_log_filename)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user