Fix VLAN_INTERFACE attach issue upon vlan id-name mismatch#1367
Merged
lguohan merged 3 commits intosonic-net:masterfrom Feb 7, 2018
Merged
Fix VLAN_INTERFACE attach issue upon vlan id-name mismatch#1367lguohan merged 3 commits intosonic-net:masterfrom
lguohan merged 3 commits intosonic-net:masterfrom
Conversation
6e1b2f8 to
dc6f190
Compare
Collaborator
|
can you add unit test this? #Resolved |
src/sonic-config-engine/minigraph.py
Outdated
| phyport_intfs = {} | ||
| vlan_intfs = {} | ||
| pc_intfs = {} | ||
| vlan_invert_mapping = dict([[v['alias'],k] for k,v in vlans.items() if v.has_key('alias')]) |
Contributor
There was a problem hiding this comment.
It could be written as following
vlan_invert_mapping = {v['alias']: k for k, v in vlans.items() if v.has_key('alias')}
``` #Resolved
Contributor
Author
|
I think VLAN part has been fixed previously, but VLAN_INTERFACE part (the ip interfaces attached to vlan) was not. This fix is to fix parsing VLAN_INTERFACE from minigraph. #Closed |
pavel-shirshov
approved these changes
Feb 5, 2018
lguohan
requested changes
Feb 6, 2018
Collaborator
lguohan
left a comment
There was a problem hiding this comment.
add unit test for this case?
lguohan
approved these changes
Feb 7, 2018
vmittal-msft
pushed a commit
to vmittal-msft/sonic-buildimage
that referenced
this pull request
Oct 20, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
- What I did
Together with #695, this will fix #1003.
- How I did it
When a Vlan has vlan name different with "Vlan"+id, it will be recorded as an alias. And when DPG is parsing, both "Vlan"+id and alias will be checked for "AttachTo" field.