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

[Edgecore][as4630-54te] Fixed pytest of sfp tx_disable test item failed. #22

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,20 @@ def get_tx_disable(self):
A Boolean, True if tx_disable is enabled, False if disabled
"""
if self.port_num < 49: #Copper port, no sysfs
return False
return [False]

if self.port_num < 53:
tx_disable = False

tx_path = "{}{}{}".format(CPLD_I2C_PATH, '/module_tx_disable_', self.port_num)
tx_disable=self._api_helper.read_txt_file(tx_path)
if tx_disable is not None:
return tx_disable
if tx_disable == '1':
return [True]
else:
return [False]
else:
return False
return [False]

else:
api = self.get_xcvr_api()
Expand Down