-
Notifications
You must be signed in to change notification settings - Fork 661
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
[debug dump util] Vlan Module Added #1877
Merged
SuvarnaMeenakshi
merged 6 commits into
sonic-net:master
from
raphaelt-nvidia:dbg_dump-vlan_2
Nov 10, 2021
Merged
[debug dump util] Vlan Module Added #1877
SuvarnaMeenakshi
merged 6 commits into
sonic-net:master
from
raphaelt-nvidia:dbg_dump-vlan_2
Nov 10, 2021
Conversation
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
Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
…nd Vivek's comments Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
…y Sud Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
Signed-off-by: raphaelt <raphaelt@contoso.com>
Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
This pull request introduces 2 alerts when merging 256403f into 9ab20fd - view on LGTM.com new alerts:
|
Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@SuvarnaMeenakshi could you please help review? |
liat-grozovik
changed the title
[Debug Dump Util] Vlan Module Added
[debug dump util] Vlan Module Added
Nov 8, 2021
dgsudharsan
approved these changes
Nov 10, 2021
SuvarnaMeenakshi
approved these changes
Nov 10, 2021
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.
lgtm
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.
Signed-off-by: Raphael Tryster raphaelt@nvidia.com
What I did
Implemented vlan and vlan_member modules for debug dump utility.
How I did it
Used infrastructure and followed examples in
#1666
#1667
#1668
#1669
#1670
How to verify it
On switch: dump state vlan <vlan_name>
dump state vlan_member '<vlan_name|<member_name>'
Unit test: pytest-3 dump_tests/module_tests/vlan_test.py (same test file covers both vlan and vlan_member)
Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)
dump state vlan <vlan_name> and all variants supported by debug dump utility.
Example:
dump state vlan Vlan4
{
"Vlan4": {
"CONFIG_DB": {
"keys": [
{
"VLAN|Vlan4": {
"vlanid": "4"
}
}
],
"tables_not_found": []
},
"APPL_DB": {
"keys": [
{
"VLAN_TABLE:Vlan4": {
"admin_status": "up",
"host_ifname": "",
"mac": "ec:0d:9a:c3:b1:00",
"mtu": "9100"
}
}
],
"tables_not_found": []
},
"ASIC_DB": {
"keys": [
{
"ASIC_STATE:SAI_OBJECT_TYPE_VLAN:oid:0x260000000005dd": {
"SAI_VLAN_ATTR_VLAN_ID": "4"
}
}
],
"tables_not_found": [],
"vidtorid": {
"oid:0x260000000005dd": "oid:0x400000026"
}
},
"STATE_DB": {
"keys": [
{
"VLAN_TABLE|Vlan4": {
"state": "ok"
}
}
],
"tables_not_found": []
}
}
}
dump state vlan_member '<vlan_name>|<member_name>' and all variants supported by debug dump utility.
Note the required use of quotes. This is because without them, the linux infrastructure interprets '|' as a command separator. Multiple vlan|member pairs can be enclosed in the same quotes.
Examples:
dump state vlan_member 'Vlan3|Ethernet0'
{
"Vlan3|Ethernet0": {
"CONFIG_DB": {
"keys": [
{
"VLAN_MEMBER|Vlan3|Ethernet0": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"APPL_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE:Vlan3:Ethernet0": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"ASIC_DB": {
"keys": [
{
"ASIC_STATE:SAI_OBJECT_TYPE_VLAN_MEMBER:oid:0x270000000005df": {
"SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID": "oid:0x3a0000000005de",
"SAI_VLAN_MEMBER_ATTR_VLAN_ID": "oid:0x260000000005dc",
"SAI_VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE": "SAI_VLAN_TAGGING_MODE_TAGGED"
}
},
{
"ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a0000000005de": {
"SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
"SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
"SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000037a",
"SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
}
}
],
"tables_not_found": [],
"vidtorid": {
"oid:0x270000000005df": "oid:0x30027",
"oid:0x3a0000000005de": "oid:0x3a"
}
},
"STATE_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE|Vlan3|Ethernet0": {
"state": "ok"
}
}
],
"tables_not_found": []
}
}
}
dump state vlan_member 'Vlan3|Ethernet8,Vlan4|Ethernet16'
{
"Vlan3|Ethernet8": {
"CONFIG_DB": {
"keys": [
{
"VLAN_MEMBER|Vlan3|Ethernet8": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"APPL_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE:Vlan3:Ethernet8": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"ASIC_DB": {
"keys": [
{
"ASIC_STATE:SAI_OBJECT_TYPE_VLAN_MEMBER:oid:0x270000000005e1": {
"SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID": "oid:0x3a0000000005e0",
"SAI_VLAN_MEMBER_ATTR_VLAN_ID": "oid:0x260000000005dc",
"SAI_VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE": "SAI_VLAN_TAGGING_MODE_TAGGED"
}
},
{
"ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a0000000005e0": {
"SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
"SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
"SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x10000000002f6",
"SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
}
}
],
"tables_not_found": [],
"vidtorid": {
"oid:0x270000000005e1": "oid:0x100030027",
"oid:0x3a0000000005e0": "oid:0x10000003a"
}
},
"STATE_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE|Vlan3|Ethernet8": {
"state": "ok"
}
}
],
"tables_not_found": []
}
},
"Vlan4|Ethernet16": {
"CONFIG_DB": {
"keys": [
{
"VLAN_MEMBER|Vlan4|Ethernet16": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"APPL_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE:Vlan4:Ethernet16": {
"tagging_mode": "tagged"
}
}
],
"tables_not_found": []
},
"ASIC_DB": {
"keys": [
{
"ASIC_STATE:SAI_OBJECT_TYPE_VLAN_MEMBER:oid:0x270000000005e3": {
"SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID": "oid:0x3a0000000005e2",
"SAI_VLAN_MEMBER_ATTR_VLAN_ID": "oid:0x260000000005dd",
"SAI_VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE": "SAI_VLAN_TAGGING_MODE_TAGGED"
}
},
{
"ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a0000000005e2": {
"SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
"SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
"SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x1000000000338",
"SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
}
}
],
"tables_not_found": [],
"vidtorid": {
"oid:0x270000000005e3": "oid:0x200040027",
"oid:0x3a0000000005e2": "oid:0x20000003a"
}
},
"STATE_DB": {
"keys": [
{
"VLAN_MEMBER_TABLE|Vlan4|Ethernet16": {
"state": "ok"
}
}
],
"tables_not_found": []
}
}
}