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

[yang]: modify Vlan Member to include PortChannel along with Port #7407

Merged
merged 7 commits into from
May 7, 2021

Conversation

ArthiSivanantham
Copy link
Contributor

Signed-off-by: Arthi Sivanantham [email protected]

Why I did it

To include PortChannel as Vlan Member (in addition to the already existing physical port)

How I did it

Modified the type of vlan member port to a union of PortChannel name and Port name.

How to verify it

sonic_yang_models package build
sonic_yang_mgmt package build

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

Modify Vlan Member to include PortChannel along with Port

Signed-off-by: Arthi Sivanantham <[email protected]>
}
}

leaf ifname {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please do not change the name here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In community call regarding naming, we have decided to name it as port for physical ethernet port and ifname for mix of ports cases. And just “name” for interfaces defined in sonic-port.yang, sonic-portchannel.yang, sonic-vlan.yang. Also since this is a key attribute, changing attribute-name will not cause any backward compatibility impact. Based on these, we have updated here

Copy link
Collaborator

Choose a reason for hiding this comment

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

ifname for mix of ports cases.?, ..., ifname is for interface name not for mix of ports.

We can stick to port:
as https://github.com/Azure/sonic-buildimage/blob/29763cd095e8bb63c0756a84b375ef5d445f4648/src/sonic-yang-models/yang-models/sonic-acl.yang#L258

Copy link
Collaborator

Choose a reason for hiding this comment

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

i do not understand this. vlan_member is only for one member port, why do we have a list of port now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lguohan : Same VLAN can have multiple ports as members. Also same VLAN can have ethernet port & port-channel as members here. The comment mix-of-ports is mentioned in the perspective of different types of interfaces (Ethernet, Port-channel). Hope this clarifies the context of discussion.

@praveen-li : I remember, while we were discussing about consistent naming for interface names for this PR (#7049) in call, we said port is generally in the context specific to "Physical ethernet interfaces" and ifname (since it's interface-name) can be widely used to refer multiple different types of interfaces like Ethernet & Port-channel together + other types of interfaces like VLAN, loopback in other applications context like BGP where it will enable on all types of interfaces. In those understanding, here we have renamed it as ifname to include Etherent & Port-channel together.

@lguohan lguohan added the YANG YANG model related changes label Apr 23, 2021
@lguohan
Copy link
Collaborator

lguohan commented Apr 23, 2021

@praveen-li to review

@lguohan lguohan changed the title Modify Vlan Member to include PortChannel along with Port [yang]: modify Vlan Member to include PortChannel along with Port Apr 23, 2021
Signed-off-by: Arthi Sivanantham <[email protected]>
@rathnasabapathyv
Copy link
Collaborator

@praveen-li : @ArthiSivanantham has addressed few comments with changes & we have responded all other comments. Can you please check & approve the PR, if no further comments? Thanks.

Signed-off-by: Arthi Sivanantham <[email protected]>
@ArthiSivanantham
Copy link
Contributor Author

@praveen-li - All comments are addressed. Can you please review and approve the PR ?

@ArthiSivanantham
Copy link
Contributor Author

ArthiSivanantham commented Apr 28, 2021

@lguohan - Can you please check this generic build failure ?

build_error

Looks like pip got updated and made a backward incompatible change is breaking pyang.

@rathnasabapathyv
Copy link
Collaborator

@ArthiSivanantham : I see a recent conversation in sonic-community email thread about this recent compilation errors with sonic-acl.yang & sonic-device_metadata.yang. Looks like it's fixed in latest master. Can you try to sync the latest master to your branch and see whether builds succeeds?

That community email conversation about this:

image

@praveen-li
Copy link
Collaborator

praveen-li commented Apr 28, 2021 via email

@ArthiSivanantham
Copy link
Contributor Author

@praveen-li - All review comments are addressed. Can you please review and approve this PR ?

@lguohan lguohan merged commit 67f2939 into sonic-net:master May 7, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
…nic-net#7407)

To include PortChannel as Vlan Member (in addition to the already existing physical port)

Signed-off-by: Arthi Sivanantham <[email protected]>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…nic-net#7407)

To include PortChannel as Vlan Member (in addition to the already existing physical port)

Signed-off-by: Arthi Sivanantham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants