aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-03-11 14:11:16 +0100
committerTibor Frank <tifrank@cisco.com>2020-03-13 12:38:01 +0000
commit175f21af7c493c54b6376be88ae691f20d991363 (patch)
treef65bb3c2799e6adbd3dbe3438c2045a238f924a3
parentce3877804eabf6c75393564c56b3a2b1d9b7ee39 (diff)
Report: Remove skx NDR from detailed test results
Change-Id: I47cd491c44bd259c69c758aac600bfe94d59538f Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit bc2886111faedc0d43dcd3fe3cac787dc6e767a9)
-rw-r--r--resources/tools/presentation/generator_tables.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 5058cbf991..731bfe864a 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -287,6 +287,7 @@ def table_merged_details(table, input_data):
"""
logging.info(f" Generating the table {table.get(u'title', u'')} ...")
+
# Transform the data
logging.info(
f" Creating the data set for the {table.get(u'type', u'')} "
@@ -341,9 +342,15 @@ def table_merged_details(table, input_data):
f"{u'-'.join(col_data_lst[half:])}"
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in (u"msg", ):
+ # Temporary solution: remove NDR results from message:
+ if bool(table.get(u'remove-ndr', False)):
+ try:
+ col_data = col_data.split(u"\n", 1)[1]
+ except IndexError:
+ pass
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in \
- (u"conf-history", u"show-run"):
+ (u"conf-history", u"show-run"):
col_data = col_data.replace(u" |br| ", u"", 1)
col_data = f" |prein| {col_data[:-5]} |preout| "
row_lst.append(f'"{col_data}"')