Skip to content

Fix ASIC check on Non-SONiC leaf fanout#13171

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_fanout_asic_check
Jun 6, 2024
Merged

Fix ASIC check on Non-SONiC leaf fanout#13171
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_fanout_asic_check

Conversation

@bingwang-ms
Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
This PR is to fix an issue brought by PR #12931.

>       raise AttributeError(
            "'%s' object has no attribute '%s'" % (self.__class__, module_name)
            )
E       AttributeError: '<class 'tests.common.devices.eos.EosHost'>' object has no attribute 'facts'

The issue is because if the leaf fanout is not running SONiC, then the host has no attribute facts.
This PR addressed the issue by checking OS first and the ASIC check is bypassed if OS is not SONiC.

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

This PR is to fix an issue caused by PR #12931.

How did you do it?

This PR addressed the issue by checking OS first and the ASIC check is bypassed if OS is not SONiC.

How did you verify/test it?

The change is verified on a physical testbed without leaf fanout running SONiC.

collected 1 item                                                                                                                                                                                      

iface_loopback_action/test_iface_loopback_action.py::test_loopback_action_basic  ^HPASSED                                                                                                          [100%]

Any platform specific information?

Mellanox platform specific.

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

Not a new test case.

Documentation

Copy link
Copy Markdown
Contributor

@yanmo96 yanmo96 left a comment

Choose a reason for hiding this comment

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

LGTM

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #13176

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #13177

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.

3 participants