Skip to content

[debug dump] dump interface module added#2070

Merged
SuvarnaMeenakshi merged 17 commits intosonic-net:masterfrom
vivekrnv:dump_intf_mod
Mar 27, 2022
Merged

[debug dump] dump interface module added#2070
SuvarnaMeenakshi merged 17 commits intosonic-net:masterfrom
vivekrnv:dump_intf_mod

Conversation

@vivekrnv
Copy link
Copy Markdown
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 <[email protected]>
Signed-off-by: vkarri <[email protected]>
Signed-off-by: vkarri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]>
@lgtm-com
Copy link
Copy Markdown

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 <[email protected]>
dgsudharsan
dgsudharsan previously approved these changes Feb 16, 2022
@vivekrnv
Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv
Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@SuvarnaMeenakshi kindly reminder to review and signoff

@liat-grozovik
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@SuvarnaMeenakshi
Copy link
Copy Markdown
Contributor

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

@dgsudharsan
Copy link
Copy Markdown
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

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@SuvarnaMeenakshi kindly reminder to review and signoff

@dgsudharsan
Copy link
Copy Markdown
Collaborator

@SuvarnaMeenakshi Can you please review and signoff?

Copy link
Copy Markdown
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
Copy Markdown
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