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
4 changes: 0 additions & 4 deletions sfputil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 8 additions & 1 deletion tests/sfputil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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''')
])
Expand Down
Loading