-
Notifications
You must be signed in to change notification settings - Fork 1k
support for not all DUT ports connected to a fanout switch #2517
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7ccffff
support for dicontiguos ports
sanmalho-git e095934
Remove unused import in vlan_port.py
sanmalho-git e56bd7d
Fixed compilation error in vlan_port
sanmalho-git 52557a3
Fix key for dut_fp_ports to be the current front panel port index.
sanmalho-git 6e06212
Fixes to test failure on kvm in vm_topology
sanmalho-git 0515a5d
Fix error in remove_topo and host_interfaces
sanmalho-git e554748
Fix when the port numbers are not consecutive.
sanmalho-git 462d77f
Moved the common port_alias_to_name_map code between minigraph_facts …
sanmalho-git 27ac6c6
Removed unused imports
sanmalho-git 524dbd7
Removed unsupported hwsku's from the port_alias_to_name_map in port_u…
sanmalho-git a79eed6
potential fix for failure in vsimage testing
sanmalho-git 9a8a78d
Fix for failing tests against vs image
sanmalho-git bf8512a
Fix based on review comment
sanmalho-git be22df7
Fix in vm_topology.bind when dealing with multi-hosts
sanmalho-git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| def _port_alias_to_name_map_50G(all_ports, s100G_ports): | ||
| new_map = {} | ||
| # 50G ports | ||
| s50G_ports = list(set(all_ports) - set(s100G_ports)) | ||
|
|
||
| for i in s50G_ports: | ||
| new_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| new_map["Ethernet%d/3" % i] = "Ethernet%d" % ((i - 1) * 4 + 2) | ||
|
|
||
| for i in s100G_ports: | ||
| new_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
|
|
||
| return new_map | ||
|
|
||
| def get_port_alias_to_name_map(hwsku): | ||
| port_alias_to_name_map = {} | ||
| if hwsku == "Force10-S6000": | ||
| for i in range(0, 128, 4): | ||
| port_alias_to_name_map["fortyGigE0/%d" % i] = "Ethernet%d" % i | ||
| elif hwsku == "Force10-S6100": | ||
| for i in range(0, 4): | ||
| for j in range(0, 16): | ||
| port_alias_to_name_map["fortyGigE1/%d/%d" % (i + 1, j + 1)] = "Ethernet%d" % (i * 16 + j) | ||
| elif hwsku == "Force10-Z9100": | ||
| for i in range(0, 128, 4): | ||
| port_alias_to_name_map["hundredGigE1/%d" % (i / 4 + 1)] = "Ethernet%d" % i | ||
| elif hwsku == "Arista-7050-QX32": | ||
| for i in range(1, 25): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| for i in range(25, 33): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Arista-7050-QX-32S": | ||
| for i in range(5, 29): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 5) * 4) | ||
| for i in range(29, 37): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % ((i - 5) * 4) | ||
| elif hwsku == "Arista-7260CX3-C64" or hwsku == "Arista-7170-64C": | ||
| for i in range(1, 65): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Arista-7060CX-32S-C32" or hwsku == "Arista-7060CX-32S-Q32" or hwsku == "Arista-7060CX-32S-C32-T1" or hwsku == "Arista-7170-32CD-C32": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Mellanox-SN2700-D48C8": | ||
| # 50G ports | ||
| s50G_ports = [x for x in range(0, 24, 2)] + [x for x in range(40, 88, 2)] + [x for x in range(104, 128, 2)] | ||
|
|
||
| # 100G ports | ||
| s100G_ports = [x for x in range(24, 40, 4)] + [x for x in range(88, 104, 4)] | ||
|
|
||
| for i in s50G_ports: | ||
| alias = "etp%d" % (i / 4 + 1) + ("a" if i % 4 == 0 else "b") | ||
| port_alias_to_name_map[alias] = "Ethernet%d" % i | ||
| for i in s100G_ports: | ||
| alias = "etp%d" % (i / 4 + 1) | ||
| port_alias_to_name_map[alias] = "Ethernet%d" % i | ||
| elif hwsku == "Mellanox-SN2700" or hwsku == "ACS-MSN2700": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Arista-7060CX-32S-D48C8": | ||
| # All possible breakout 50G port numbers: | ||
| all_ports = [x for x in range(1, 33)] | ||
|
|
||
| # 100G ports | ||
| s100G_ports = [x for x in range(7, 11)] | ||
| s100G_ports += [x for x in range(23, 27)] | ||
|
|
||
| port_alias_to_name_map = _port_alias_to_name_map_50G(all_ports, s100G_ports) | ||
| elif hwsku == "Arista-7260CX3-D108C8": | ||
| # All possible breakout 50G port numbers: | ||
| all_ports = [x for x in range(1, 65)] | ||
|
|
||
| # 100G ports | ||
| s100G_ports = [x for x in range(13, 21)] | ||
|
|
||
| port_alias_to_name_map = _port_alias_to_name_map_50G(all_ports, s100G_ports) | ||
| elif hwsku == "INGRASYS-S9100-C32": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "INGRASYS-S9100-C32" or hwsku == "INGRASYS-S9130-32X" or hwsku == "INGRASYS-S8810-32Q": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "INGRASYS-S8900-54XC": | ||
| for i in range(1, 49): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % (i - 1) | ||
| for i in range(49, 55): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 49) * 4 + 48) | ||
| elif hwsku == "INGRASYS-S8900-64XC": | ||
| for i in range(1, 49): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % (i - 1) | ||
| for i in range(49, 65): | ||
| port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 49) * 4 + 48) | ||
| elif hwsku == "Accton-AS7712-32X": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["hundredGigE%d" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Celestica-DX010-C32": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Seastone-DX010": | ||
| for i in range(1, 33): | ||
| port_alias_to_name_map["Eth%d" % i] = "Ethernet%d" % ((i - 1) * 4) | ||
| elif hwsku == "Celestica-E1031-T48S4": | ||
| for i in range(1, 53): | ||
| port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % ((i - 1)) | ||
| elif hwsku == "et6448m": | ||
| for i in range(0, 52): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % i | ||
| elif hwsku == "newport": | ||
| for i in range(0, 256, 8): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % i | ||
| else: | ||
| for i in range(0, 128, 4): | ||
| port_alias_to_name_map["Ethernet%d" % i] = "Ethernet%d" % i | ||
|
|
||
| return port_alias_to_name_map | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.