Open ganglyu opened 4 months ago
Port table for multi-asic device is: admin@vlab-08:~$ sudo sonic-cfggen -d -v PORT {'Ethernet1/1': {'admin_status': 'up', 'description': 'ASIC0:Eth0-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/2': {'admin_status': 'up', 'd escription': 'ASIC0:Eth1-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/3': {'admin_status': 'up', 'description': 'ASIC0:Eth2-ASIC0', 'mtu': ' 9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/4': {'admin_status': 'up', 'description': 'ASIC0:Eth3-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000 ', 'tpid': '0x8100'}, 'Ethernet1/5': {'admin_status': 'up', 'description': 'ASIC1:Eth0-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/6': {'ad min_status': 'up', 'description': 'ASIC1:Eth1-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/7': {'admin_status': 'up', 'description': 'ASIC1: Eth2-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/8': {'admin_status': 'up', 'description': 'ASIC1:Eth3-ASIC1', 'mtu': '9100', 'pfc_asym': ' off', 'speed': '40000', 'tpid': '0x8100'}}
Above ports do not have lanes, but "lanes" is a mandatory field: https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-port.yang#L49
Yang validation failed.
Port table should have "lanes", or "lanes" should not be mandatory.
show version
(paste your output here)
show techsupport
(paste your output here or download and attach the file here )
https://stackoverflow.com/questions/65582700/yang-model-mandatory-node-only-when-condition-is-true
@xincunli-sonic Can you provide ETA?
@SuvarnaMeenakshi please help check this.
Description
Port table for multi-asic device is: admin@vlab-08:~$ sudo sonic-cfggen -d -v PORT {'Ethernet1/1': {'admin_status': 'up', 'description': 'ASIC0:Eth0-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/2': {'admin_status': 'up', 'd escription': 'ASIC0:Eth1-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/3': {'admin_status': 'up', 'description': 'ASIC0:Eth2-ASIC0', 'mtu': ' 9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/4': {'admin_status': 'up', 'description': 'ASIC0:Eth3-ASIC0', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000 ', 'tpid': '0x8100'}, 'Ethernet1/5': {'admin_status': 'up', 'description': 'ASIC1:Eth0-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/6': {'ad min_status': 'up', 'description': 'ASIC1:Eth1-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/7': {'admin_status': 'up', 'description': 'ASIC1: Eth2-ASIC1', 'mtu': '9100', 'pfc_asym': 'off', 'speed': '40000', 'tpid': '0x8100'}, 'Ethernet1/8': {'admin_status': 'up', 'description': 'ASIC1:Eth3-ASIC1', 'mtu': '9100', 'pfc_asym': ' off', 'speed': '40000', 'tpid': '0x8100'}}
Above ports do not have lanes, but "lanes" is a mandatory field: https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-port.yang#L49
Steps to reproduce the issue:
Describe the results you received:
Yang validation failed.
Describe the results you expected:
Port table should have "lanes", or "lanes" should not be mandatory.
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):