Skip to content

Make 'show version' docker images output conditional on '--verbose' flag#4288

Open
ashwnsri wants to merge 3 commits intosonic-net:masterfrom
ashwnsri:show-version-verbose
Open

Make 'show version' docker images output conditional on '--verbose' flag#4288
ashwnsri wants to merge 3 commits intosonic-net:masterfrom
ashwnsri:show-version-verbose

Conversation

@ashwnsri
Copy link
Contributor

@ashwnsri ashwnsri commented Feb 19, 2026

What I did

Modified the show version command to only display Docker image information when the --verbose flag is provided.

How I did it

Updated the version function in src/sonic-utilities/show/main.py. Added a conditional check if verbose: around the code block that retrieves and prints the Docker images list.

How to verify it

  1. Run show version and verify that the output shows the version/platform information but does NOT list the Docker images.
  2. Run show version --verbose and verify that the output includes the "Docker images:" section with the list of images at the end.

Previous command output (if the output of a command-line utility has changed)

old-show-ver-output.txt

New command output (if the output of a command-line utility has changed)

new-show-ver-output.txt

Signed-off-by: Ashwin Srinivasan ashwin.srinivasan@hpe.com

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ashwnsri ashwnsri changed the title Make 'show version' docker image output conditional on '--verbose' flag Make 'show version' docker images output conditional on '--verbose' flag Feb 19, 2026
@ashwnsri ashwnsri self-assigned this Feb 19, 2026
@ashwnsri ashwnsri added the show label Feb 19, 2026
@ashwnsri ashwnsri force-pushed the show-version-verbose branch from 130c7d2 to b21200e Compare February 19, 2026 21:52
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

What I did
Modified the `show version` command to only display Docker image information when the `--verbose` flag is provided.

How I did it
Updated the `version` function in `src/sonic-utilities/show/main.py`. Added a conditional check `if verbose:` around the code block that retrieves and prints the Docker images list.

How to verify it
1. Run `show version` and verify that the output shows the version/platform information but does NOT list the Docker images.
2. Run `show version --verbose` and verify that the output includes the "Docker images:" section with the list of images at the end.

Previous command output

New command output

Signed-off-by: Ashwin Srinivasan <asrinivasan@juniper.net>
@ashwnsri ashwnsri force-pushed the show-version-verbose branch from b21200e to d9a66de Compare February 19, 2026 21:53
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Ashwin Srinivasan <asrinivasan@juniper.net>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Ashwin Srinivasan <asrinivasan@juniper.net>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants