From 82ff5592fd3b58e9d4675b2ac2491db0c2911129 Mon Sep 17 00:00:00 2001 From: Nicholas Kuechler Date: Fri, 28 Mar 2025 08:26:23 -0500 Subject: [PATCH] feat: Adds diffsync human-friendly summary to uc-diff output --- .../diff-nautobot-understack/diff_nautobot_understack/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/diff-nautobot-understack/diff_nautobot_understack/cli.py b/python/diff-nautobot-understack/diff_nautobot_understack/cli.py index 98d64501c..11bb857fe 100644 --- a/python/diff-nautobot-understack/diff_nautobot_understack/cli.py +++ b/python/diff-nautobot-understack/diff_nautobot_understack/cli.py @@ -46,6 +46,9 @@ def display_output( diff_output_props.get("title"), diff_output_props.get("id_column_name"), ) + elif __output_format == "human": + print("Summary:\n") + print(diff_result.str()) else: print(diff_result.dict()) @@ -96,7 +99,7 @@ def project( def network( debug: bool = typer.Option(False, "--debug", "-v", help="Enable debug mode"), output_format: str = typer.Option( - "json", "--format", help="Available formats json, table" + "json", "--format", help="Available formats: json, table, human" ), ): """OpenStack networks ⟹ Nautobot UCVNIs"""