Issue Description
PR:
#15069
Currently, all the multiDUT snappi tests are reading the config_set and linecard_choice defined in tests/snappi_tests/variable.py to run the test.
This has two major drawbacks:
- The variable.py gets tied to a specific setup. If the user has multiple setups, there will be modifications required in variables.py to run the test on that setup.
- The link speed is not considered in the variable.py. In case of the linecard_choice, there is no info about the presence of the speed info. There is no choice for the user to determine if the test needs to run on 100/400Gbps port or both.
A good idea would be to reconstruct a variable.py like dictionary using the duthosts and conn_graph_fact that is generated at the start of the test. Then user can define if the test needs to be run on what link speeds and what combinations of line card choice.
Example:
port_speeds = [100, 400]
line_choice = ['single_linecard_single_asic']
A port_config_list can be constructed using duthosts and conn_graph_facts generated at the start of the test. The port_config_list could have an additional key to define asic_type of interface as well.
port_config_list = {}
for duthost in duthosts:
port_config_list.update(duthost: conn_graph_facts.get("device_conn", {}).get(duthost.hostname, {}))
Output:
conn_graph_facts.get("device_conn", {}).get('ixre-egl-boardxx', {})
{u'Ethernet144': {u'peerdevice': u'abc', u'speed': u'400000', u'peerport': u'Card1/Port3'},
u'Ethernet0': {u'peerdevice': u'abc', u'speed': u'400000', u'peerport': u'Card1/Port1'},
u'Ethernet8': {u'peerdevice': u'abc', u'speed': u'400000', u'peerport': u'Card1/Port2'}}
We can enhance this to choose interfaces based on speed and line_card_choice that setup requires. It also become easy to choose if the speed requires multi-speed (different speed ingress and egress) interfaces.
@kamalsahu0001 @selldinesh
Results you see
There is stringent requirement to define different variables.py for each setup. Some modifications are required if speed is also a factor for running the test.
Results you expected to see
There should be no requirement to define the variables.py and user should have access to line-card ports and speed from the parameters defined/generated at the start of the test.
Is it platform specific
generic
Relevant log output
No response
Output of show version
No response
Attach files (if any)
No response
Issue Description
PR:
#15069
Currently, all the multiDUT snappi tests are reading the config_set and linecard_choice defined in tests/snappi_tests/variable.py to run the test.
This has two major drawbacks:
A good idea would be to reconstruct a variable.py like dictionary using the duthosts and conn_graph_fact that is generated at the start of the test. Then user can define if the test needs to be run on what link speeds and what combinations of line card choice.
Example:
port_speeds = [100, 400]
line_choice = ['single_linecard_single_asic']
A port_config_list can be constructed using duthosts and conn_graph_facts generated at the start of the test. The port_config_list could have an additional key to define asic_type of interface as well.
Output:
We can enhance this to choose interfaces based on speed and line_card_choice that setup requires. It also become easy to choose if the speed requires multi-speed (different speed ingress and egress) interfaces.
@kamalsahu0001 @selldinesh
Results you see
There is stringent requirement to define different variables.py for each setup. Some modifications are required if speed is also a factor for running the test.
Results you expected to see
There should be no requirement to define the variables.py and user should have access to line-card ports and speed from the parameters defined/generated at the start of the test.
Is it platform specific
generic
Relevant log output
No response
Output of
show versionNo response
Attach files (if any)
No response