-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for tunnel route status in show vnet routes all. #2341
Merged
siqbal1986
merged 5 commits into
sonic-net:master
from
siqbal1986:CLI_vnet_route_all_tunnel_route_status_addition
Sep 15, 2022
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
781806f
Added support for tunnel route status in show vnet routes all.
siqbal1986 a26f064
typo fix.
siqbal1986 ac7549d
Added a test for the CLI. Fixed a bug.
siqbal1986 bec449c
Updated command reference.
siqbal1986 4fa67ae
Merge branch 'master' into CLI_vnet_route_all_tunnel_route_status_add…
siqbal1986 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
from click.testing import CliRunner | ||
from utilities_common.db import Db | ||
import show.main as show | ||
|
||
class TestShowVnetRoutesAll(object): | ||
@classmethod | ||
def setup_class(cls): | ||
print("SETUP") | ||
os.environ["UTILITIES_UNIT_TESTING"] = "1" | ||
|
||
def test_show_vnet_routes_all_basic(self): | ||
runner = CliRunner() | ||
db = Db() | ||
|
||
result = runner.invoke(show.cli.commands['vnet'].commands['routes'].commands['all'], [], obj=db) | ||
assert result.exit_code == 0 | ||
expected_output = """\ | ||
vnet name prefix nexthop interface | ||
----------- -------- --------- ----------- | ||
|
||
vnet name prefix endpoint mac address vni status | ||
--------------- ------------------------ ------------------------------------------- ------------- ----- -------- | ||
Vnet_v6_in_v6-0 fddd:a156:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 active | ||
test_v4_in_v4-0 160.162.191.1/32 100.251.7.1 active | ||
test_v4_in_v4-0 160.163.191.1/32 100.251.7.1 active | ||
test_v4_in_v4-0 160.164.191.1/32 100.251.7.1 | ||
""" | ||
assert result.output == expected_output |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests so as to pass coverage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done