Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
REDIS_PORT = 6379
REDIS_TIMEOUT_USECS = 0

# parameters for SFP presence
SFP_STATUS_INSERTED = '1'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
PORT_START = 0
Expand Down Expand Up @@ -71,7 +74,7 @@ def get_presence(self, port_num):
content = reg_file.readline().rstrip()

# content is a string with the qsfp status
if content == "1":
if content == SFP_STATUS_INSERTED:
return True

return False
Expand Down
5 changes: 4 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
REDIS_PORT = 6379
REDIS_TIMEOUT_USECS = 0

# parameters for SFP presence
SFP_STATUS_INSERTED = '1'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
PORT_START = 0
Expand Down Expand Up @@ -70,7 +73,7 @@ def get_presence(self, port_num):
content = reg_file.readline().rstrip()

# content is a string with the qsfp status
if content == "good":
if content == SFP_STATUS_INSERTED:
return True

return False
Expand Down
5 changes: 4 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
REDIS_PORT = 6379
REDIS_TIMEOUT_USECS = 0

# parameters for SFP presence
SFP_STATUS_INSERTED = '1'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
PORT_START = 0
Expand Down Expand Up @@ -71,7 +74,7 @@ def get_presence(self, port_num):
content = reg_file.readline().rstrip()

# content is a string with the qsfp status
if content == "good":
if content == SFP_STATUS_INSERTED:
return True

return False
Expand Down
5 changes: 4 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
REDIS_PORT = 6379
REDIS_TIMEOUT_USECS = 0

# parameters for SFP presence
SFP_STATUS_INSERTED = '1'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
PORT_START = 0
Expand Down Expand Up @@ -70,7 +73,7 @@ def get_presence(self, port_num):
content = reg_file.readline().rstrip()

# content is a string with the qsfp status
if content == "good":
if content == SFP_STATUS_INSERTED:
return True

return False
Expand Down
5 changes: 4 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
REDIS_PORT = 6379
REDIS_TIMEOUT_USECS = 0

# parameters for SFP presence
SFP_STATUS_INSERTED = '1'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
PORT_START = 0
Expand Down Expand Up @@ -70,7 +73,7 @@ def get_presence(self, port_num):
content = reg_file.readline().rstrip()

# content is a string with the qsfp status
if content == "good":
if content == SFP_STATUS_INSERTED:
return True

return False
Expand Down