Subject: [netmod] leaf-list with default(s), no way to have explicitly empty list

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Mon, 19 Mar 2018 12:50:14 +0000

Hi all,

In YANG 1.1 we can specify defaults for leaf-lists.

I assume that means there is no way for a NETCONF client to explicitly create/declare an empty list (i.e. a list with no values) when there is a default (i.e. declare that no values are to be in use) ?

In that case, if the ability to explicitly say "no values are in use" in a leaf-list with defaults would have to be done in some other way, e.g. perhaps using a choice like this:

choice source {
    case source {
        leaf-list source { ...  default "x"; }
    }
    case none {
        leaf no-sources { type empty; }
    }
}

Rgds,
Jason