Skip to content
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] dump interface module added #2070

Merged
merged 17 commits into from
Mar 27, 2022

Conversation

vivekrnv
Copy link
Contributor

What I did

HLD for Dump Utility: HLD.

  • Added the Interface Module to the Debug Dump Utility
  • Added the Corresponding UT's
  • Refactored Common methods required into match_helper.py

How I did it

How to verify it

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

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

root@mts-sonic-dut/root/# dump state interface Ethernet16 --key-map
{
    "Ethernet16": {
        "CONFIG_DB": {
            "keys": [
                "INTERFACE|Ethernet16",
                "INTERFACE|Ethernet16|10.0.0.8/31"
            ],
            "tables_not_found": []
        },
        "APPL_DB": {
            "keys": [
                "INTF_TABLE:Ethernet16",
                "INTF_TABLE:Ethernet16:10.0.0.8/31"
            ],
            "tables_not_found": []
        },
        "STATE_DB": {
            "keys": [
                "INTERFACE_TABLE|Ethernet16",
                "INTERFACE_TABLE|Ethernet16|10.0.0.8/31"
            ],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                "ASIC_STATE:SAI_OBJECT_TYPE_ROUTER_INTERFACE:oid:0x60000000005d0"
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x60000000005d0": "oid:0x34100000006"
            }
        }
    }
}


root@mts-sonic-dut/root/# dump state interface PortChannel1234 --key-map
{
    "PortChannel1234": {
        "CONFIG_DB": {
            "keys": [
                "PORTCHANNEL_INTERFACE|PortChannel1234",
                "PORTCHANNEL_INTERFACE|PortChannel1234|7.7.7.1/24"
            ],
            "tables_not_found": []
        },
        "APPL_DB": {
            "keys": [
                "INTF_TABLE:PortChannel1234",
                "INTF_TABLE:PortChannel1234:7.7.7.1/24"
            ],
            "tables_not_found": []
        },
        "STATE_DB": {
            "keys": [
                "INTERFACE_TABLE|PortChannel1234",
                "INTERFACE_TABLE|PortChannel1234|7.7.7.1/24"
            ],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                "ASIC_STATE:SAI_OBJECT_TYPE_ROUTER_INTERFACE:oid:0x60000000005ec"
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x60000000005ec": "oid:0x4100000006"
            }
        }
    }
}

root@mts-sonic-dut/root/# dump state interface Eth0.1 --key-map
{
    "Eth0.1": {
        "CONFIG_DB": {
            "keys": [
                "VLAN_SUB_INTERFACE|Eth0.1",
                "VLAN_SUB_INTERFACE|Eth0.1|9.9.9.9/24"
            ],
            "tables_not_found": []
        },
        "APPL_DB": {
            "keys": [
                "INTF_TABLE:Eth0.1",
                "INTF_TABLE:Eth0.1:9.9.9.9/24"
            ],
            "tables_not_found": []
        },
        "STATE_DB": {
            "keys": [
                "INTERFACE_TABLE|Eth0.1",
                "INTERFACE_TABLE|Eth0.1|9.9.9.9/24"
            ],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                "ASIC_STATE:SAI_OBJECT_TYPE_ROUTER_INTERFACE:oid:0x60000000005e9"
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x60000000005e9": "oid:0x90100000006"
            }
        }
    }
}

vkarri and others added 8 commits January 28, 2022 19:50
Signed-off-by: vkarri <vkarri@nvidia.com>
Signed-off-by: vkarri <vkarri@nvidia.com>
Signed-off-by: vkarri <vkarri@nvidia.com>
Signed-off-by: vkarri <vkarri@contoso.com>
Signed-off-by: vkarri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 15, 2022

This pull request introduces 6 alerts when merging 91a6fab into 84ddbfd - view on LGTM.com

new alerts:

  • 6 for Unused import

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
dgsudharsan
dgsudharsan previously approved these changes Feb 16, 2022
@vivekrnv
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@SuvarnaMeenakshi kindly reminder to review and signoff

@liat-grozovik
Copy link
Collaborator

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@SuvarnaMeenakshi
Copy link
Contributor

Why do we need this specific change when we already have "dump state port " and "dump state portchannel"?
#1853
#1667

@dgsudharsan
Copy link
Collaborator

Why do we need this specific change when we already have "dump state port " and "dump state portchannel"? #1853 #1667

The interface is a separate table in config_db and it is different from port which is for the physical port attributes and portchannel which is for LAG's properties

vivekrnv and others added 2 commits March 7, 2022 08:34
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@SuvarnaMeenakshi kindly reminder to review and signoff

@dgsudharsan
Copy link
Collaborator

@SuvarnaMeenakshi Can you please review and signoff?

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 827358f into sonic-net:master Mar 27, 2022
vivekrnv added a commit to vivekrnv/sonic-utilities that referenced this pull request May 23, 2022
Added the Interface Module to the Debug Dump Utility
Added the Corresponding UT's
Refactored Common methods required into match_helper.py
@vivekrnv
Copy link
Contributor Author

Request for 202111

judyjoseph pushed a commit that referenced this pull request May 25, 2022
Added the Interface Module to the Debug Dump Utility
Added the Corresponding UT's
Refactored Common methods required into match_helper.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants