diff --git a/src/sonic-utilities b/src/sonic-utilities index 3490d3ac19e8..3d9be4574838 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 3490d3ac19e8a71a0b535fd77cfe635a569d89fc +Subproject commit 3d9be4574838647d442c6e1205e424051b78c1f6 diff --git a/src/sonic-yang-models/yang-models/sonic-acl.yang b/src/sonic-yang-models/yang-models/sonic-acl.yang index 37b16ef0a003..a0155e69e417 100644 --- a/src/sonic-yang-models/yang-models/sonic-acl.yang +++ b/src/sonic-yang-models/yang-models/sonic-acl.yang @@ -267,7 +267,7 @@ module sonic-acl { } leaf-list ports { - /* union of leafref is allowed in YANG 1.1 */ + /* union of leafref is allowed in YANG 1.1 */ type union { type leafref { path /port:sonic-port/port:PORT/port:PORT_LIST/port:port_name; @@ -275,7 +275,15 @@ module sonic-acl { type leafref { path /lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:portchannel_name; } + type string { + pattern ""; + } } + /* Today in SONiC, we do not delete the list once + * created, instead we set to empty list. Due to that + * below default values are needed. + */ + default ""; } } /* end of ACL_TABLE_LIST */ diff --git a/src/sonic-yang-models/yang-models/sonic-portchannel.yang b/src/sonic-yang-models/yang-models/sonic-portchannel.yang index a9bc5dc3b1bf..bf342b9fcfec 100644 --- a/src/sonic-yang-models/yang-models/sonic-portchannel.yang +++ b/src/sonic-yang-models/yang-models/sonic-portchannel.yang @@ -60,9 +60,19 @@ module sonic-portchannel { leaf-list members { /* leaf-list members are unique by default */ - type leafref { - path /port:sonic-port/port:PORT/port:PORT_LIST/port:port_name; + type union { + type leafref { + path /port:sonic-port/port:PORT/port:PORT_LIST/port:port_name; + } + type string { + pattern ""; + } } + /* Today in SONiC, we do not delete the list once + * created, instead we set to empty list. Due to that + * below default values are needed. + */ + default ""; } leaf min_links { diff --git a/src/sonic-yang-models/yang-models/sonic-vlan.yang b/src/sonic-yang-models/yang-models/sonic-vlan.yang index d345241c6f74..cba7ce1d0f8e 100644 --- a/src/sonic-yang-models/yang-models/sonic-vlan.yang +++ b/src/sonic-yang-models/yang-models/sonic-vlan.yang @@ -161,14 +161,6 @@ module sonic-vlan { leaf admin_status { type head:admin_status; } - - leaf-list members { - /* leaf-list members are unique by default */ - - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:port_name"; - } - } } /* end of VLAN_LIST */ }