X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fspecification_parser.py;h=6909c31e7f0aea9d333b4b299529fe0a4d1a5e7e;hb=d1671ee102a7583e3a3b311b19f55bfe45e36d68;hp=a94d09f3fab5d61484fbdc6c5545aa3db756e970;hpb=c763cfcb064e4f4acf6b8309b08d3800b9bd5331;p=csit.git diff --git a/resources/tools/presentation/specification_parser.py b/resources/tools/presentation/specification_parser.py index a94d09f3fa..6909c31e7f 100644 --- a/resources/tools/presentation/specification_parser.py +++ b/resources/tools/presentation/specification_parser.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -441,6 +441,9 @@ class Specification: self._specification[u"environment"][u"limits"] = \ self._cfg_yaml[idx].get(u"limits", None) + self._specification[u"environment"][u"frequency"] = \ + self._cfg_yaml[idx].get(u"frequency", dict()) + self._specification[u"environment"][u"urls"] = \ self._cfg_yaml[idx].get(u"urls", None) @@ -666,9 +669,16 @@ class Specification: table[u"columns"][i][u"data-replacement"] = \ self.data_sets[data_set] + if table.get(u"lines", None): + for i in range(len(table[u"lines"])): + data_set = table[u"lines"][i].get(u"data-set", None) + if isinstance(data_set, str): + table[u"lines"][i][u"data-set"] = \ + self.data_sets[data_set] + except KeyError: raise PresentationError( - f"Wrong data set used in {table.get(u'title', u'')}." + f"Wrong set '{data_set}' used in {table.get(u'title', u'')}." ) self._specification[u"tables"].append(table)