-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Switchport Modes Port & Port Channel Config-Engine Support #17632
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
Closed
Closed
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ada3e18
Fix for Elastic test
ridahanif96 b60bbbc
Switchport config-engine changes
ridahanif96 e3408f8
Fix for platform output
ridahanif96 78c97cb
Fix for failures
ridahanif96 61038fa
Fixutres
ridahanif96 6698bcc
Fix for failure
ridahanif96 57ec25f
Fix for Failures
ridahanif96 d728e19
Rerun pipelines
ridahanif96 32f8696
Fixing spaces and other issues
ridahanif96 e3f034f
Unnessary spaces removed
ridahanif96 872e12d
Fix for Vlan membership check in mingraph related files
ridahanif96 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1880,6 +1880,13 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw | |
| for port in ports.values(): | ||
| port['mtu'] = '9100' | ||
| port['tpid'] = '0x8100' | ||
| # mode check for vlan membership in PORT table default mode is routed and for vlan membership it is trunk | ||
| for port_name, port in ports.items(): | ||
| if 'mode' not in port: | ||
| if port_name in [key[1] for key in vlan_members.keys()]: | ||
| port['mode'] = 'trunk' | ||
| else: | ||
| port['mode'] = 'routed' | ||
|
|
||
| # asymmetric PFC is disabled by default | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you do not need remove empty line.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted |
||
| for port in ports.values(): | ||
|
|
@@ -1951,6 +1958,13 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw | |
| pc['mtu'] = '9100' | ||
| pc['tpid'] = '0x8100' | ||
| pc['admin_status'] = 'up' | ||
| # mode check for vlan membership in portchannel and default mode is routed and mode is trunk when port channel has vlan membership | ||
| for pc_name, pc in pcs.items(): | ||
| if 'mode' not in pc: | ||
| if pc_name in [key[1] for key in vlan_members.keys()]: | ||
| pc['mode'] = 'trunk' | ||
| else: | ||
| pc['mode'] = 'routed' | ||
|
|
||
| results['PORTCHANNEL'] = pcs | ||
| results['PORTCHANNEL_MEMBER'] = pc_members | ||
|
|
||
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 |
|---|---|---|
| @@ -1,115 +1,152 @@ | ||
| { | ||
| "interfaces": { | ||
| "Ethernet0": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet4": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet8": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet12": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet16": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet20": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet24": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet28": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet32": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet36": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet40": { | ||
| "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]" | ||
| "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet44": { | ||
| "default_brkout_mode": "2x50G[40G,25G,10G,1G]" | ||
| "default_brkout_mode": "2x50G[40G,25G,10G,1G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet48": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet52": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet56": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet60": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet64": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet68": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet72": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet76": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet80": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet84": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet88": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet92": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet96": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet100": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet104": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet108": { | ||
| "default_brkout_mode": "4x25G[10G]" | ||
| "default_brkout_mode": "4x25G[10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet112": { | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet116": { | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)" | ||
| "default_brkout_mode": "1x50G(2)+2x25G(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet120": { | ||
| "default_brkout_mode": "1x100G[40G]" | ||
| "default_brkout_mode": "1x100G[40G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet124": { | ||
| "default_brkout_mode": "2x50G" | ||
| "default_brkout_mode": "2x50G", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet128": { | ||
| "default_brkout_mode": "1x40G[100G]" | ||
| "default_brkout_mode": "1x40G[100G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet132": { | ||
| "default_brkout_mode": "1x25G[100G,50G,40G,10G]" | ||
| "default_brkout_mode": "1x25G[100G,50G,40G,10G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet136": { | ||
| "default_brkout_mode": "4x10G[25G]" | ||
| "default_brkout_mode": "4x10G[25G]", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet140": { | ||
| "default_brkout_mode": "2x25G(2)+1x50000(2)" | ||
| "default_brkout_mode": "2x25G(2)+1x50000(2)", | ||
| "mode" : "routed" | ||
| }, | ||
| "Ethernet144": { | ||
| "default_brkout_mode": "1x100000[50G,40000,25G,10000]" | ||
| "default_brkout_mode": "1x100000[50G,40000,25G,10000]", | ||
| "mode" : "routed" | ||
| } | ||
| } | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you can implement a conditional default value in relevant consuming component, no need to add explicit attribute during load_minigraph. We try to prevent any minigraph.py behavior change now. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here in minigraph .py, we implemented conditional default value in relevant consuming component.
Do we need to remove all this conditional change as well from minigraph.py