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] vlan subintf name does not match yang model definition #10503

Closed
ganglyu opened this issue Apr 8, 2022 · 1 comment · Fixed by #10792
Closed

[yang] vlan subintf name does not match yang model definition #10503

ganglyu opened this issue Apr 8, 2022 · 1 comment · Fixed by #10792
Assignees
Labels
sonic-cfggen SONiC Configuration Generator Tool Triaged this issue has been triaged YANG YANG model related changes

Comments

@ganglyu
Copy link
Contributor

ganglyu commented Apr 8, 2022

Description

Yang model does not support long name format for portchannel.

libyang[0]: Must condition "(substring-before(current(), '.') = /sonic-port:sonic-port/sonic-port:PORT/sonic-port:PORT_LIST/sonic-port:name) or (starts-with(substring-before(current(), '.'), 'Eth') and concat('Ethernet', substring-after(substring-before(current(), '.'), 'Eth')) = /sonic-port:sonic-port/sonic-port:PORT/sonic-port:PORT_LIST/sonic-port:name) or (starts-with(substring-before(current(), '.'), 'Po') and concat('PortChannel', substring-after(substring-before(current(), '.'), 'Po')) = /sonic-portchannel:sonic-portchannel/sonic-portchannel:PORTCHANNEL/sonic-portchannel:PORTCHANNEL_LIST/sonic-portchannel:name)" not satisfied. (path: /sonic-vlan-sub-interface:sonic-vlan-sub-interface/VLAN_SUB_INTERFACE/VLAN_SUB_INTERFACE_LIST[name='PortChannel01.10']/name)
libyang[0]: Must condition not satisfied, please follow vlan sub interface naming convention (path: /sonic-vlan-sub-interface:sonic-vlan-sub-interface/VLAN_SUB_INTERFACE/VLAN_SUB_INTERFACE_LIST[name='PortChannel01.10']/name)

Steps to reproduce the issue:

  1. Create vlan subintf on portchannel
  2. Run Yang validation

Describe the results you received:

Configurations generated from minigraph can't pass yang validation.

Describe the results you expected:

Configurations generated from minigraph should pass yang validation.

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@ganglyu ganglyu added sonic-cfggen SONiC Configuration Generator Tool YANG YANG model related changes labels Apr 8, 2022
@neethajohn neethajohn assigned lolyu and unassigned neethajohn Apr 12, 2022
@ganglyu
Copy link
Contributor Author

ganglyu commented Apr 28, 2022

Need to modify unit test to use 15 characters long sub interface name, related test cases are:
test_minigraph_storage_backend_no_resource_type
test_minigraph_sub_port_interfaces
test_minigraph_sub_port_intf_resource_type

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Apr 28, 2022
@ganglyu ganglyu linked a pull request May 10, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sonic-cfggen SONiC Configuration Generator Tool Triaged this issue has been triaged YANG YANG model related changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants