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

Implement is_copper for QSFP-DD #482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcsteven
Copy link

@jcsteven jcsteven commented Jul 5, 2024

Description

Add is_copper() api for QSFP-DD.

Motivation and Context

While I tested with as9726-32d and as9736-64d with QSFP-DD transceiver via adding is_copper() in my modified sfputil tools, it shows that is_copper() not implemented for QSFP-DD.
In this PR is to add the is_copper() in sonic_platform_base/sonic_xcvr/api/public/cmis.py and its pytest feature for this api.

How Has This Been Tested?

A. Git clone the fixed code:

B. Install pip dependencie in virtual environment

    1. Create virtual environment: python3.10 -m venv venv-3.10
    1. Active virtual environment: source venv-3.10/bin/activate
    1. pip install -U pytest
    1. pip install pytest-cov
    1. pip install mock
    1. pip install sonic_py_common-1.0-py3-none-any.whl

C. Run the pytest:

    1. pytest -v tests/sonic_xcvr/test_cmis.py

Additional Information (Optional)

Test log as: test_cmis.py-test-log.txt
Test summary:

test-screen-shot

Copy link

linux-foundation-easycla bot commented Jul 5, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@@ -703,6 +703,18 @@ def get_module_media_interface(self):
else:
return 'Unknown media interface'

def is_copper(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jcsteven why not use is_flat_memory()

oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
* [xcvrd] Fix issue: logical_port_name is not defined

* Add UT

---------

Co-authored-by: Prince George <[email protected]>
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.

2 participants