X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fmodel%2Fexport_json.py;h=840c49fa70a47a479d61fa324dd5552a11f3b8b1;hb=c0cbaf897aa00152c4ce21987b6eb2ec371be6b0;hp=4f1b86dbf454878aaa431e275f873ed2201f57af;hpb=01d8f262afc567c3d49a23c3cb2cdeaced8a6887;p=csit.git diff --git a/resources/libraries/python/model/export_json.py b/resources/libraries/python/model/export_json.py index 4f1b86dbf4..840c49fa70 100644 --- a/resources/libraries/python/model/export_json.py +++ b/resources/libraries/python/model/export_json.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2022 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -34,7 +34,7 @@ from robot.libraries.BuiltIn import BuiltIn from resources.libraries.python.Constants import Constants from resources.libraries.python.model.ExportResult import ( - export_dut_type_and_version + export_dut_type_and_version, export_tg_type_and_version ) from resources.libraries.python.model.mem2raw import write_raw_output from resources.libraries.python.model.raw2info import convert_content_to_info @@ -93,10 +93,7 @@ class export_json(): def warn_on_bad_export(self): """If bad state is detected, log a warning and clean up state.""" if self.raw_file_path is not None or self.raw_data is not None: - logger.warn( - f"Previous export not clean, path {self.raw_file_path}\n" - f"data: {self.raw_data}" - ) + logger.warn(f"Previous export not clean, path {self.raw_file_path}") self.raw_data = None self.raw_file_path = None @@ -170,6 +167,7 @@ class export_json(): self.raw_data[u"hosts"] = set() self.raw_data[u"log"] = list() export_dut_type_and_version() + export_tg_type_and_version() def start_suite_teardown_export(self): """Set new file path, initialize data for the suite teardown.