showclock/timezones cmd cli formatter#277
Closed
Sreevanich16 wants to merge 2 commits into
Closed
Conversation
Author
@microsoft-github-policy-service agree company="Microsoft" |
|
1.Please move to 202112 instead of master.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Onboarded show clock/timezones commands formatter which will convert json format to CLI format
How I did it
Used base formatters
How to verify it
PS Q:\src\sonic-utilities.msft> python -m unittest show_gnmi_util.test.test_formatters -v
test_format_basic (show_gnmi_util.test.test_formatters.TestShowClockFormatter.test_format_basic)
Test basic clock formatting ... ok
test_format_different_date (show_gnmi_util.test.test_formatters.TestShowClockFormatter.test_format_different_date)
Test formatting with different date string ... ok
test_format_empty_date (show_gnmi_util.test.test_formatters.TestShowClockFormatter.test_format_empty_date)
Test formatting with missing date ... ok
test_format_basic (show_gnmi_util.test.test_formatters.TestShowClockTimezonesFormatter.test_format_basic)
Test basic timezones formatting ... ok
test_format_empty_timezones (show_gnmi_util.test.test_formatters.TestShowClockTimezonesFormatter.test_format_empty_timezones)
Test formatting with empty timezone list ... ok
test_format_no_timezones_key (show_gnmi_util.test.test_formatters.TestShowClockTimezonesFormatter.test_format_no_timezones_key)
Test formatting when timezones key is missing ... ok
test_format_single_timezone (show_gnmi_util.test.test_formatters.TestShowClockTimezonesFormatter.test_format_single_timezone)
Test formatting with single timezone ... ok
test_format_basic (show_gnmi_util.test.test_formatters.TestShowVersionFormatter.test_format_basic)
Test basic formatting ... ok
test_format_with_docker_images (show_gnmi_util.test.test_formatters.TestShowVersionFormatter.test_format_with_docker_images)
Test formatting with docker images ... ok
test_nil_values (show_gnmi_util.test.test_formatters.TestShowVersionFormatter.test_nil_values)
Test handling of nil values ... ok
test_empty_data (show_gnmi_util.test.test_formatters.TestShowVlanBriefFormatter.test_empty_data)
test_format_basic (show_gnmi_util.test.test_formatters.TestShowVlanBriefFortest_format_basic (show_gnmi_util.test.test_formatters.TestShowVlanBriefFormatter.test_format_basic)
Test basic VLAN formatting ... ok
Test basic VLAN formatting ... ok
test_multiple_ports (show_gnmi_util.test.test_formatters.TestShowVlanBriefFormatter.test_multiple_ports)
Test formatting with multiple ports ... ok
Ran 13 tests in 0.004s
OK
Previous command output (if the output of a command-line utility has changed)
This is new utility, we don't have previous output. The output should be similar to existing CLI, hence pasting CLI o/p =>
New command output (if the output of a command-line utility has changed)