diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py index 053b591b70..7fd349f6ea 100644 --- a/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py @@ -15,6 +15,9 @@ REDIS_HOSTNAME = "localhost" 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 @@ -71,7 +74,7 @@ class SfpUtil(SfpUtilBase): 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 diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py index d534386e2f..a4cb383a81 100644 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py @@ -15,6 +15,9 @@ REDIS_HOSTNAME = "localhost" 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 @@ -70,7 +73,7 @@ class SfpUtil(SfpUtilBase): 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 diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py index bc61073ba1..f437ce5f36 100644 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py @@ -15,6 +15,9 @@ REDIS_HOSTNAME = "localhost" 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 @@ -71,7 +74,7 @@ class SfpUtil(SfpUtilBase): 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 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py index f85fcc4d90..63ede42590 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py @@ -15,6 +15,9 @@ REDIS_HOSTNAME = "localhost" 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 @@ -70,7 +73,7 @@ class SfpUtil(SfpUtilBase): 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 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py index f85fcc4d90..63ede42590 100644 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py @@ -15,6 +15,9 @@ REDIS_HOSTNAME = "localhost" 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 @@ -70,7 +73,7 @@ class SfpUtil(SfpUtilBase): 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