Skip to content
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

Fix VLAN_INTERFACE attach issue upon vlan id-name mismatch #1367

Merged
merged 3 commits into from
Feb 7, 2018

Conversation

taoyl-ms
Copy link
Contributor

@taoyl-ms taoyl-ms commented Feb 3, 2018

- 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.

@lguohan
Copy link
Collaborator

lguohan commented Feb 4, 2018

can you add unit test this? #Resolved

Copy link
Contributor

@pavel-shirshov pavel-shirshov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this PR. Because the issue was fixed earlier. Now we don't use the vintfname for anything. We use 'sonic_vlan_name' as key for Vlans. sonic_vlan_name is generated using VlanID without vlan_name

@@ -398,9 +400,13 @@ def parse_xml(filename, platform=None, port_config_file=None):
phyport_intfs = {}
vlan_intfs = {}
pc_intfs = {}
vlan_invert_mapping = dict([[v['alias'],k] for k,v in vlans.items() if v.has_key('alias')])
Copy link
Contributor

@pavel-shirshov pavel-shirshov Feb 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be written as following

vlan_invert_mapping = {v['alias']: k for k, v in vlans.items() if v.has_key('alias')}
``` #Resolved

@taoyl-ms
Copy link
Contributor Author

taoyl-ms commented Feb 5, 2018

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

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add unit test for this case?

@lguohan lguohan merged commit 4925d48 into sonic-net:master Feb 7, 2018
mssonicbld added a commit that referenced this pull request Apr 26, 2024
…tically (#18573)

#### Why I did it
src/sonic-sairedis
```
* c3395e5 - (HEAD -> master, origin/master, origin/HEAD) Add support for AMD-Pensando elba DSS (#1367) (19 hours ago) [Shantanu Shrivastava]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sonic-cfg]: Vlan names from the minigraph could be incompatible with SONiC Vlan interfaces naming schema
3 participants