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

Handle RJ45 port when checking presence #5927

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

stephenxs
Copy link
Contributor

@stephenxs stephenxs commented Jul 5, 2022

Description of PR

Summary:

  • Expose 'type' to show_interfaces
  • Handle expected presence status differently between 'RJ45' and normal ports

Signed-off-by: Stephen Sun stephens@nvidia.com

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Expose type of a port to show_interfaces, which enables other modules to leverage type to implement certain functionalities. Eg. In platform API test, the number of RJ45 ports can be calculated via counting the ports whose type is RJ45.

How did you do it?

Parse the output of show interface status and extract type field and then push it into the dict.
Do not try parsing it if the output is in the old format.

How did you verify/test it?

Manually test and regression test.

Any platform specific information?

N/A

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

N/A

Documentation

keboliu
keboliu previously approved these changes Jul 7, 2022
- Expose 'type' to show_interfaces
- Handle expected presence status differently between 'RJ45' and normal ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs force-pushed the fix-RJ45-presence-state branch from 1926ec6 to efc318b Compare August 12, 2022 08:59
@stephenxs
Copy link
Contributor Author

Hi
The failure in the dualtor testbed seems to be a common issue which also is failing other PRs like #6153
Can anyone help check this?
Thanks

@stephenxs stephenxs requested a review from keboliu August 15, 2022 09:20
@stephenxs stephenxs marked this pull request as ready for review August 15, 2022 09:27
@stephenxs stephenxs requested a review from sujinmkang as a code owner August 15, 2022 09:27
@stephenxs
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@keboliu
Copy link
Contributor

keboliu commented Aug 19, 2022

@sujinmkang would you please help to review?

@keboliu keboliu requested a review from prgeor August 23, 2022 02:21
@liat-grozovik
Copy link
Collaborator

@prgeor kindly reminder to review and signoff. this is needed for complete support of rj45 in 202205.

@prgeor
Copy link
Contributor

prgeor commented Sep 2, 2022

@stephenxs can you add more details to the PRs? The PR tempalate is empty:-

Description of PR
Summary:
Fixes # (issue)

Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation

@stephenxs
Copy link
Contributor Author

@stephenxs can you add more details to the PRs? The PR tempalate is empty:-

Description of PR
Summary:
Fixes # (issue)

Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation

@prgeor Done.

@prgeor prgeor merged commit c81815d into sonic-net:master Sep 8, 2022
@stephenxs stephenxs deleted the fix-RJ45-presence-state branch September 9, 2022 00:25
Azarack pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 17, 2022
* Handle RJ45 port when checking presence

- Expose 'type' to show_interfaces
- Handle expected presence status differently between 'RJ45' and normal ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Leverage module "interface" to calculate number of RJ45 ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Signed-off-by: Stephen Sun <stephens@nvidia.com>
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
* Handle RJ45 port when checking presence

- Expose 'type' to show_interfaces
- Handle expected presence status differently between 'RJ45' and normal ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Leverage module "interface" to calculate number of RJ45 ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants