diff options
author | Tibor Frank <tifrank@cisco.com> | 2021-05-03 14:22:31 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2021-06-08 08:18:58 +0200 |
commit | c763cfcb064e4f4acf6b8309b08d3800b9bd5331 (patch) | |
tree | e47b01ffb250c7eafdad140f336d492e358f851c /resources/tools/presentation/pal.py | |
parent | fd84de690150a1ef15eeeebc32f70ff54cb25e66 (diff) |
PAL: Convert XML to JSON
Change-Id: I24f0ddc412d4353ba244c58a3068b5b0ea4349e3
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/pal.py')
-rw-r--r-- | resources/tools/presentation/pal.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 5bbea297ef..7e2d9a8dbd 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -29,9 +29,10 @@ from generator_files import generate_files from generator_report import generate_report from generator_cpta import generate_cpta from generator_alerts import Alerting, AlertingError +from convert_xml_json import convert_xml_to_json -OUTPUTS = (u"none", u"report", u"trending", u"convert_to_json") +OUTPUTS = (u"none", u"report", u"trending", u"convert-xml-to-json") def parse_args(): @@ -131,6 +132,7 @@ def main(): spec.read_specification() except PresentationError as err: logging.critical(u"Finished with error.") + logging.critical(repr(err)) return 1 if spec.output[u"output"] not in OUTPUTS: @@ -170,6 +172,8 @@ def main(): alert.generate_alerts() except AlertingError as err: logging.warning(repr(err)) + elif spec.output[u"output"] == u"convert-xml-to-json": + convert_xml_to_json(spec, data) else: logging.info("No output will be generated.") |