-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for not all DUT ports connected to a fanout switch #2517
Merged
Commits on Dec 23, 2020
-
conn_graph_facts: conn_graph_facts.py returns device_vlan_map_list. This used to be a dictionary with key being hostname and value being a list of vlanids for the fanout ports. We have modified this where the value instead of being a list of vlanids, it is a dictionary with key being the port_index and the value being the vlan id. This port_index is what gets put in the topology file. We get the port by looking at the host_port_vlans defined in the conn_graph for that device. This host_port_vlans has key being the Ethernet port (like Ethernet10) and value being a dictionary with key 'vlanlist' being a the list of fanout vlans. We check against all the ports 'vlanlist' to get the port on the DUT that connects to this fanout vlan, and then split on 'Ethernet' to get the port index. For example - lets say on dut with hostname "dut1", we have port Ethernet10 connected to fanout w/ vlan 120, and Ethernet11 connected to fanout w/ vlan 121, then we would have: "host_port_vlans": { "Ethernet10": { "mode": "Access", "vlanids": "120", "vlanlist": [ 120 ] }, "Ethernet11": { "mode": "Access", "vlanids": "121", "vlanlist": [ 121 ] } } "VlanList": [ 120, 121 ] For vlan 120 in VlanList, we would iterate through host_port_vlans to find the port that has vlan 120 - in our case "Ethernet10". The port_index would then be "10". Similarly, for vlan 121, the port_index would be "Ethernet11". So, returned device_vlan_map_list would be: "dut1" : { "10" : 120, "11" : 121 } - vlan_port/kvm_port/mellanox_simx_port: - Updated to return (dut_fp_ports) a dictionary with key being the port index (same as in the topo file) and vlan being the port - instead of the just the list of ports. bind/unbind vm_topology: - vlan_index is now a string in the dictionary of dut_fp_ports - updated regexp for checking valid vlan for multi-dut to be of the format '<dutIndex>.<portIndex>@<ptfIndex>' remove_dut_port.yml: - set cmd to "remove" instead of "create" in vlan_port module call. }
Configuration menu - View commit details
-
Copy full SHA for 7ccffff - Browse repository at this point
Copy the full SHA 7ccffffView commit details -
Configuration menu - View commit details
-
Copy full SHA for e095934 - Browse repository at this point
Copy the full SHA e095934View commit details -
Configuration menu - View commit details
-
Copy full SHA for e56bd7d - Browse repository at this point
Copy the full SHA e56bd7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52557a3 - Browse repository at this point
Copy the full SHA 52557a3View commit details -
Fixes to test failure on kvm in vm_topology
- The dut_fp_ports is a dictionary with key being a string and not an integer
Configuration menu - View commit details
-
Copy full SHA for 6e06212 - Browse repository at this point
Copy the full SHA 6e06212View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0515a5d - Browse repository at this point
Copy the full SHA 0515a5dView commit details -
Fix when the port numbers are not consecutive.
- We were using the port name like 'Ethernet10' and splitting in out 'Ethernet' to get the port_index in the device_vlan_map_list. This port_index is to correspond to what would be in the topology file. This would not work when ports are not consecutively names - like 'Ethernet0', 'Ethernet4', 'Ethernet8' ..... In this scenario, the topology file would have host_interfaces/vlans still as 0,1,2,..... Fix is to get the port names based on 'hwksu' (like it is done for minigraph) and then use that list to get the port_index to be put into device_vlan_map_list
Configuration menu - View commit details
-
Copy full SHA for e554748 - Browse repository at this point
Copy the full SHA e554748View commit details -
Moved the common port_alias_to_name_map code between minigraph_facts …
…and conn_graph_facts to module_utils/port_utils The port_alias_to_name_map is generated based on hwsku and is common code between minigraph_facts and conn_graph_facts ansible module. Now that module_utils are supported, added module_utils/port_utils.py to have this common code. Modified the ansible modules to use this new common code.
Configuration menu - View commit details
-
Copy full SHA for 462d77f - Browse repository at this point
Copy the full SHA 462d77fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27ac6c6 - Browse repository at this point
Copy the full SHA 27ac6c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 524dbd7 - Browse repository at this point
Copy the full SHA 524dbd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a79eed6 - Browse repository at this point
Copy the full SHA a79eed6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a8a78d - Browse repository at this point
Copy the full SHA 9a8a78dView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf8512a - Browse repository at this point
Copy the full SHA bf8512aView commit details -
Fix in vm_topology.bind when dealing with multi-hosts
Since dut_fp_ports is a dictionary with key being the dut name, and the value being a dictionary with key being the interface index as a string, need to typecast the host_interfaces interface index as a string.
Configuration menu - View commit details
-
Copy full SHA for be22df7 - Browse repository at this point
Copy the full SHA be22df7View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.