Skip to content

Add namespace support for show interface neighbor expected#3781

Merged
yejianquan merged 2 commits intosonic-net:masterfrom
auspham:austinpham/28837145-update-show-interface-neighbors-multiasic
Mar 3, 2025
Merged

Add namespace support for show interface neighbor expected#3781
yejianquan merged 2 commits intosonic-net:masterfrom
auspham:austinpham/28837145-update-show-interface-neighbors-multiasic

Conversation

@auspham
Copy link
Contributor

@auspham auspham commented Feb 25, 2025

What I did

Adding namespace support for show interface neighbor expected. So that we can use

show interface neighbor expected -n asic0

How I did it

How to verify it

Verified on T2 testbed

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

admin@somehost:/var/log$ show interfaces neighbor expected -n asic1
Usage: show interfaces neighbor expected [OPTIONS] [INTERFACENAME]
Try "show interfaces neighbor expected -h" for help.

Error: no such option: -n

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

admin@somehost:/var/log$ show interfaces neighbor expected -n asic1
LocalPort    Neighbor    NeighborPort    NeighborLoopback    NeighborMgmt    NeighborType
-----------  ----------  --------------  ------------------  --------------  --------------
Ethernet96   ARISTAXXTX  Ethernet1       None                XXX.XX.XXX.XX   someHub
Ethernet104  ARISTAXXTX Ethernet1       None                XXX.XX.XXX.XX   otherHub
...

@mssonicbld
Copy link
Collaborator

/azp run

@auspham auspham changed the title feat: add namespace support for show interface neighbor expected Add namespace support for show interface neighbor expected Feb 25, 2025
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/28837145-update-show-interface-neighbors-multiasic branch from afa3c02 to bff9242 Compare February 26, 2025 04:01
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang
Copy link
Contributor

Will ip netns exec asicx xxx be enough for the requirement?

@auspham
Copy link
Contributor Author

auspham commented Feb 28, 2025

Will ip netns exec asicx xxx be enough for the requirement?

yes ip netns exec asicx will work as well. We will need to adjust the tests a bit and cannot use inherited SonicAsic method. This would be a nice improvement.

sdszhang
sdszhang previously approved these changes Feb 28, 2025
Copy link
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

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

lgtm

FengPan-Frank
FengPan-Frank previously approved these changes Feb 28, 2025
@auspham auspham dismissed stale reviews from FengPan-Frank and sdszhang via 9accb0c February 28, 2025 05:04
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

sdszhang
sdszhang previously approved these changes Feb 28, 2025
@auspham auspham force-pushed the austinpham/28837145-update-show-interface-neighbors-multiasic branch from 9accb0c to 814f764 Compare February 28, 2025 07:09
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham requested a review from FengPan-Frank March 3, 2025 00:10
@auspham auspham requested a review from sdszhang March 3, 2025 00:11
@auspham
Copy link
Contributor Author

auspham commented Mar 3, 2025

hi @FengPan-Frank could you have a review again. please. Thanks

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #3790

yejianquan pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Mar 6, 2025
Description of PR
Summary:

Add support for multi-asic compatible for this tests. This PR requires sonic-net/sonic-utilities#3781 to be merged as it's support -n <namespace>

Fixes # (issue) 28837145

Approach
What is the motivation for this PR?
Described above

How did you do it?
Utility improvement: sonic-net/sonic-utilities#3781

Use namespace to get the information so that it's compatible with multi-asic.

Enabled internal port when querying for port_alias_fact which was disabled before for compatibility

How did you verify/test it?
T2 testbed verified

Signed-off-by: Austin Pham <[email protected]>
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
Description of PR
Summary:

Add support for multi-asic compatible for this tests. This PR requires sonic-net/sonic-utilities#3781 to be merged as it's support -n <namespace>

Fixes # (issue) 28837145

Approach
What is the motivation for this PR?
Described above

How did you do it?
Utility improvement: sonic-net/sonic-utilities#3781

Use namespace to get the information so that it's compatible with multi-asic.

Enabled internal port when querying for port_alias_fact which was disabled before for compatibility

How did you verify/test it?
T2 testbed verified

Signed-off-by: Austin Pham <[email protected]>
OriTrabelsi pushed a commit to OriTrabelsi/sonic-mgmt that referenced this pull request Apr 1, 2025
Description of PR
Summary:

Add support for multi-asic compatible for this tests. This PR requires sonic-net/sonic-utilities#3781 to be merged as it's support -n <namespace>

Fixes # (issue) 28837145

Approach
What is the motivation for this PR?
Described above

How did you do it?
Utility improvement: sonic-net/sonic-utilities#3781

Use namespace to get the information so that it's compatible with multi-asic.

Enabled internal port when querying for port_alias_fact which was disabled before for compatibility

How did you verify/test it?
T2 testbed verified

Signed-off-by: Austin Pham <[email protected]>
nmoray pushed a commit to nmoray/sonic-utilities that referenced this pull request Jun 25, 2025
…#3781)

What I did
Adding namespace support for show interface neighbor expected. So that we can use

show interface neighbor expected -n asic0
How I did it
How to verify it
Verified on T2 testbed

Previous command output (if the output of a command-line utility has changed)
admin@somehost:/var/log$ show interfaces neighbor expected -n asic1
Usage: show interfaces neighbor expected [OPTIONS] [INTERFACENAME]
Try "show interfaces neighbor expected -h" for help.

Error: no such option: -n
New command output (if the output of a command-line utility has changed)
admin@somehost:/var/log$ show interfaces neighbor expected -n asic1
LocalPort    Neighbor    NeighborPort    NeighborLoopback    NeighborMgmt    NeighborType
-----------  ----------  --------------  ------------------  --------------  --------------
Ethernet96   ARISTAXXTX  Ethernet1       None                XXX.XX.XXX.XX   someHub
Ethernet104  ARISTAXXTX Ethernet1       None                XXX.XX.XXX.XX   otherHub
...

Signed-off-by: Austin Pham <[email protected]>
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.

5 participants