Skip to content

Get peer fanout from the first interface on the dut connected to the …#8823

Merged
wenyiz2021 merged 1 commit intosonic-net:masterfrom
mannytaheri:is_mellanox_fanout
Jul 12, 2023
Merged

Get peer fanout from the first interface on the dut connected to the …#8823
wenyiz2021 merged 1 commit intosonic-net:masterfrom
mannytaheri:is_mellanox_fanout

Conversation

@mannytaheri
Copy link
Copy Markdown
Contributor

Description of PR

Get peer fanout from the first interface on the dut which is connected to the fanout instead of Ethernet0

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • [x ] Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

In is_mellanox_fanout definition interface Ethernet0 is hard coded as the interface that is connected to the fanout.
This is fine for a T2 max topology since all interfaces are connected to a fanout.
For a T2 min topology if Ethernet0 is not used (not connected to a fanout), it will produce an error:

    fanout_host = dut_facts["device_conn"][duthost.hostname]["Ethernet0"]["peerdevice"]
    E       KeyError: 'Ethernet0'

Therefore, we should get the peer fanout from the first interface that is connected to a fanout.

How did you do it?

We get the peer fanout using the first interface that is connected to the fanout.

How did you verify/test it?

It was tested on multi ASICs T2 chassis with min topology and made sure the connected interface is not Ethernet0.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@rlhui rlhui requested a review from ZhaohuiS July 12, 2023 17:10
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202205: #8951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants