-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
orignal PR #2341 The status information is retrieved using the status of the prefix from Application DB. The status field can have 3 values. Empty : Configured but not in Application DB. Active : Configured and active in ASIC. Inacive : Configured but not in ASIC due to lack of BFD session with endpoint How to verify it Add a vxlan tunnel route with single Endpoint monitoring. run the command to see active/ inactive based on BFD session state. if multiple Endpoints are present then atleast one has to be Up for status to show up as active. if endpoint monitoring is not enabled then status would show up as active. Previous command output (if the output of a command-line utility has changed) vnet name prefix endpoint mac address vni Vnet1 10.2.1.0/24 200.3.152.32 Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3 Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 test_v4_in_v4-0 160.62.191.1/32 100.251.7.1 test_v4_in_v4-0 160.63.191.1/32 100.251.7.2 test_v4_in_v4-0 160.64.191.1/32 100.251.7.3 New command output (if the output of a command-line utility has changed) vnet name prefix endpoint mac address vni status Vnet1 10.2.1.0/24 200.3.152.32 active Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3 Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 inactive test_v4_in_v4-0 160.62.191.1/32 100.251.7.1 inactive test_v4_in_v4-0 160.63.191.1/32 100.251.7.2 inactive test_v4_in_v4-0 160.64.191.1/32 100.251.7.3 inactive
- Loading branch information
1 parent
936f1b1
commit b1b3661
Showing
5 changed files
with
66 additions
and
7 deletions.
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 |