* CLI expansion of leafrefs default behavior changed

* In the autocli and handcrafted CLI:s using `expand_dbvar()` the CLI expansion followed the leafrefs to the sources, ie the origin of the leafrefs
    * Instead leafref expansion now only looks at the leafrefs
This commit is contained in:
Olof hagsand 2022-05-10 10:06:43 +02:00
parent 614c927343
commit a49cf41d1e
4 changed files with 36 additions and 5 deletions

View file

@ -53,6 +53,7 @@ module clixon-config {
CLICON_NETCONF_BASE_CAPABILITY
CLICON_HTTP_DATA_PATH
CLICON_HTTP_DATA_ROOT
CLICON_CLI_EXPAND_LEAFREF
Released in Clixon 5.7";
}
revision 2022-02-11 {
@ -762,6 +763,21 @@ module clixon-config {
This only applies if you have multi-line help strings, such as when generating
from a spec, such as in the autocli.";
}
leaf CLICON_CLI_EXPAND_LEAFREF {
type boolean;
default false;
description
"If true, then CLI expansion of leafrefs (in expand_dbvar) are done using the
source values, not the references.
This applies to the autocli but also in a handcrafted CLI if expand_dbvar is used.
Example, assume ifref with leafref pointing to source if values:
<if>a</if><if>b</if><if>c</if>
<ifref>b</ifref>
If true, expansion will suggest a, b, c (source if values)
If false, expansion will suggest b (destination ifref values)
While setting this value makes sense for adding new values, it makes less sense for
deleting.";
}
leaf CLICON_SOCK_FAMILY {
type socket_address_family;
default UNIX;