diff --git a/sfputil/main.py b/sfputil/main.py index ade59aba5b..5f1ba0af2d 100644 --- a/sfputil/main.py +++ b/sfputil/main.py @@ -701,10 +701,6 @@ def eeprom(port, dump_dom, namespace): output += "API is none while getting DOM info!\n" click.echo(output) sys.exit(ERROR_NOT_IMPLEMENTED) - else: - if api.is_flat_memory(): - output += "DOM values not supported for flat memory module\n" - continue try: xcvr_dom_info = platform_chassis.get_sfp(physical_port).get_transceiver_dom_real_value() except NotImplementedError: diff --git a/tests/sfputil_test.py b/tests/sfputil_test.py index 2299639f10..51529580a3 100644 --- a/tests/sfputil_test.py +++ b/tests/sfputil_test.py @@ -61,6 +61,13 @@ dom_capability: N/A type_abbrv_name: QSFP28 """ +EMPTY_DOM_VALUES = """ ChannelMonitorValues: + ChannelThresholdValues: + ModuleMonitorValues: + ModuleThresholdValues: + + +""" class TestSfputil(object): def test_format_dict_value_to_string(self): @@ -676,7 +683,7 @@ def test_show_eeprom_RJ45(self, mock_chassis): @patch('sfputil.main.platform_sfputil', MagicMock(is_logical_port=MagicMock(return_value=1))) @patch('sfputil.main.is_port_type_rj45', MagicMock(return_value=False)) @pytest.mark.parametrize("exception, xcvr_api_none, expected_output", [ - (None, False, '''DOM values not supported for flat memory module\n\n'''), + (None, False, EMPTY_DOM_VALUES), (NotImplementedError, False, '''API is currently not implemented for this platform\n\n'''), (None, True, '''API is none while getting DOM info!\n\n''') ])