From b0d97cb77d51f633b007285b28b78affe880d95e Mon Sep 17 00:00:00 2001 From: Arvindsrinivasan Lakshmi Narasimhan <55814491+arlakshm@users.noreply.github.com> Date: Thu, 16 May 2024 17:13:08 -0700 Subject: [PATCH] [chassis][voq] Remove the leaf ref for the ifname in sonic-system-port.yang (#18855) Microsoft ADO 27934751: Fixes #18854 Update the sonic-system-port.yang to remove the check to have ifname as leafref in the port table The system-port config table will have all the ports in the chassis not only to one linecard, so in case of the chassis with different linecards sku with different number of ports this leafref will not work. --- src/sonic-yang-models/yang-models/sonic-system-port.yang | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/sonic-yang-models/yang-models/sonic-system-port.yang b/src/sonic-yang-models/yang-models/sonic-system-port.yang index 804b3313fc18..f95405ac662f 100644 --- a/src/sonic-yang-models/yang-models/sonic-system-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-system-port.yang @@ -40,13 +40,8 @@ module sonic-system-port { } leaf ifname { - type union { - type leafref { - path /port:sonic-port/port:PORT/port:PORT_LIST/port:name; - } - type string { - pattern "Cpu0"; - } + type string { + length 1..128; } }