Skip to content

Commit

Permalink
updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulyalin committed Nov 2, 2023
1 parent f623f0a commit 8ae8f24
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions salt_nornir/salt_nornir_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def nr_test(*args, **kwargs):
"remove_tasks": False,
**kwargs,
"add_details": True,
"return_tests_suite": True
"return_tests_suite": True,
},
)
# iterate over results and log tests statuses
Expand Down Expand Up @@ -264,7 +264,7 @@ def nr_test(*args, **kwargs):
devices_test_suite.append(
f'<p><details><summary>{host} ({len(suite_content)} tests)</summary><p style="margin-left:20px;">{yaml.dump(suite_content, default_flow_style=False)}</p></details></p>'
)

logger.info(
f"<details><summary>Test suite results details</summary><p>{tests_results_html_table}</p></details>",
html=True,
Expand Down Expand Up @@ -340,9 +340,9 @@ def nr_cli(*args, **kwargs):
(
f'{minion} minion, {host} device, task "{result["name"]}" failed - '
f'<span style="background-color: #CE3E01">"{result["exception"]}"</span>'
f'<p><details><summary>Collected output</summary>'
f"<p><details><summary>Collected output</summary>"
f'<p style="margin-left:20px;"><font face="courier new">{result["result"]}'
f'</font></p></details></p>'
f"</font></p></details></p>"
),
html=True,
)
Expand All @@ -351,9 +351,9 @@ def nr_cli(*args, **kwargs):
(
f'{minion} minion, {host} device, task "{result["name"]}" - '
f'<span style="background-color: #97BD61">success</span>'
f'<p><details><summary>Collected output</summary>'
f"<p><details><summary>Collected output</summary>"
f'<p style="margin-left:20px;"><font face="courier new">{result["result"]}'
f'</font></p></details></p>'
f"</font></p></details></p>"
),
html=True,
)
Expand Down Expand Up @@ -410,9 +410,9 @@ def nr_cfg(*args, **kwargs):
(
f'{minion} minion, {host} device, task "{result["name"]}" failed - '
f'<span style="background-color: #CE3E01">"{result["exception"]}"</span>'
f'<p><details><summary>Collected output</summary>'
f"<p><details><summary>Collected output</summary>"
f'<p style="margin-left:20px;"><font face="courier new">{result["result"]}'
f'</font></p></details></p>'
f"</font></p></details></p>"
),
html=True,
)
Expand All @@ -421,9 +421,9 @@ def nr_cfg(*args, **kwargs):
(
f'{minion} minion, {host} device, task "{result["name"]}" - '
f'<span style="background-color: #97BD61">success</span>'
f'<p><details><summary>Collected output</summary>'
f"<p><details><summary>Collected output</summary>"
f'<p style="margin-left:20px;"><font face="courier new">{result["result"]}'
f'</font></p></details></p>'
f"</font></p></details></p>"
),
html=True,
)
Expand All @@ -433,4 +433,4 @@ def nr_cfg(*args, **kwargs):
if has_errors:
raise ContinuableFailure(ret)
# return ret with no errors in structured format
return ret
return ret

0 comments on commit 8ae8f24

Please sign in to comment.