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

Add is_copper definition to cmis api #500

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

Conversation

bobbymcgonigle
Copy link

Description

For CMIS it's pretty easy to tell if a module is copper because the media interface will always be either passive_copper_media_interface or active_cable_media_interface. This PR adds a check for that.

Motivation and Context

Similar to other SFF xcvr api's it would be helpful to know if a CMIS module is copper or optical. We can use this information for tunings and in other areas where appropriate.

How Has This Been Tested?

Manually tested a lot of copper and optical modules ensuring they return the correct type.

Additional Information (Optional)

Please cast this to 202405 also - I've made sure that the diff applies successfully

Returns True if the module is copper, False otherwise
'''
media_intf = self.get_module_media_type()
return media_intf == "passive_copper_media_interface" or media_intf == "active_cable_media_interface"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Active cable is not passive media. Active cables like AEC have datapath state machine. @mihirpat1 can you check

Copy link
Contributor

Choose a reason for hiding this comment

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

@prgeor Confirmed that active cables like AEC have datapath state machine. Hence, this check needs to be modified.

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.

3 participants