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

[as5835-54x] Implement get_transceiver_change_event() in sfputil.py #3308

Merged
merged 2 commits into from
Aug 13, 2019

Conversation

brandonchuang
Copy link
Contributor

Signed-off-by: brandon_chuang brandon_chuang@edge-core.com

- What I did

  • Implement get_transceiver_change_event() of sfputil.py
  • Add buffering=0 to the parameter of open() to enhance the performance.

- How I did it
Read the presence status of all ports from CPLD and update the presence dictionary in get_transceiver_change_event() of sfputil.py

- How to verify it
sfputil show presence
sfputil show eeprom
show interfaces transciever

Signed-off-by: brandon_chuang <brandon_chuang@CicadaBuildServer.accton.com.tw>
return int(rev,16)

data = {'valid':0, 'last':0, 'present':0}
def get_transceiver_change_event(self, timeout=2000):
Copy link
Collaborator

Choose a reason for hiding this comment

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

this function is a blocking call and the default timeout is 0 meaning it is blocking.

https://github.com/Azure/sonic-platform-common/blob/master/sonic_platform_base/sonic_sfp/sfputilbase.py#L1257

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

implementation does not meet the spec.

…he spec

Signed-off-by: brandon_chuang <brandon_chuang@CicadaBuildServer.accton.com.tw>
@brandonchuang
Copy link
Contributor Author

Add another commit to follow the spec.
Please help review again.

@lguohan
Copy link
Collaborator

lguohan commented Aug 13, 2019

retest vsimage please

@jleveque jleveque merged commit c605dd2 into sonic-net:master Aug 13, 2019
wangshengjun pushed a commit to wangshengjun/sonic-buildimage that referenced this pull request Nov 16, 2020
…onic-net#3308)

Signed-off-by: brandon_chuang <brandon_chuang@CicadaBuildServer.accton.com.tw>
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