Issue Description
test_algorithm_config run into failure with non nVidia platform
Results you see
=================================== FAILURES ===================================
_____________________________ test_hash_capability _____________________________
duthost =
global_hash_capabilities = {'ecmp': 'not supported', 'ecmp_algo': 'N/A', 'lag': 'not supported', 'lag_algo': 'N/A'}
def test_hash_capability(duthost, global_hash_capabilities): # noqa:F811
"""
Test case to verify the 'show switch-hash capabilities' command.
Args:
duthost (AnsibleHost): Device Under Test (DUT)
global_hash_capabilities: module level fixture to get the dut hash capabilities
"""
with allure.step('Check the dut hash capabilities are as expected'):
ecmp_hash_capability, lag_hash_capability = global_hash_capabilities['ecmp'], global_hash_capabilities['lag']
asic_type = duthost.facts["asic_type"]
expected_hash_capabilities = HASH_CAPABILITIES.get(asic_type, HASH_CAPABILITIES['default'])
expected_ecmp_hash_capability = expected_hash_capabilities['ecmp']
expected_lag_hash_capability = expected_hash_capabilities['lag']
pytest_assert(sorted(ecmp_hash_capability) == sorted(expected_ecmp_hash_capability),
'The ecmp hash capability is not as expected.')
E Failed: The ecmp hash capability is not as expected.
asic_type = 'broadcom'
duthost =
ecmp_hash_capability = 'not supported'
expected_ecmp_hash_capability = ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]
expected_hash_capabilities = {'ecmp': ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...], 'lag': ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]}
expected_lag_hash_capability = ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]
global_hash_capabilities = {'ecmp': 'not supported', 'ecmp_algo': 'N/A', 'lag': 'not supported', 'lag_algo': 'N/A'}
lag_hash_capability = 'not supported'
Results you expected to see
the test can pass
Is it platform specific
generic
Relevant log output
No response
Output of show version
No response
Attach files (if any)
No response
Issue Description
test_algorithm_config run into failure with non nVidia platform
Results you see
=================================== FAILURES ===================================
_____________________________ test_hash_capability _____________________________
duthost =
global_hash_capabilities = {'ecmp': 'not supported', 'ecmp_algo': 'N/A', 'lag': 'not supported', 'lag_algo': 'N/A'}
E Failed: The ecmp hash capability is not as expected.
asic_type = 'broadcom'
duthost =
ecmp_hash_capability = 'not supported'
expected_ecmp_hash_capability = ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]
expected_hash_capabilities = {'ecmp': ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...], 'lag': ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]}
expected_lag_hash_capability = ['IN_PORT', 'SRC_MAC', 'DST_MAC', 'ETHERTYPE', 'VLAN_ID', 'IP_PROTOCOL', ...]
global_hash_capabilities = {'ecmp': 'not supported', 'ecmp_algo': 'N/A', 'lag': 'not supported', 'lag_algo': 'N/A'}
lag_hash_capability = 'not supported'
Results you expected to see
the test can pass
Is it platform specific
generic
Relevant log output
No response
Output of
show versionNo response
Attach files (if any)
No response