- Fixed: [Duplicate lines emitted by cli_show_config (cli output style) when yang list element has composite key](https://github.com/clicon/clixon/issues/258)
This commit is contained in:
parent
d1ed4ecd7d
commit
ca14879e8c
2 changed files with 5 additions and 3 deletions
|
|
@ -78,6 +78,7 @@ Users may have to change how they access the system
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
* Fixed: [Duplicate lines emitted by cli_show_config (cli output style) when yang list element has composite key](https://github.com/clicon/clixon/issues/258)
|
||||||
* Fixed: [JSON leaf-list output single element leaf-list does not use array](https://github.com/clicon/clixon/issues/261)
|
* Fixed: [JSON leaf-list output single element leaf-list does not use array](https://github.com/clicon/clixon/issues/261)
|
||||||
* Fixed: Netconf diff callback did not work with choice and same value replace
|
* Fixed: Netconf diff callback did not work with choice and same value replace
|
||||||
* Eg if YANG is `choice c { leaf x; leaf y }` and XML changed from `<x>42</x>` to `<y>42</y>` the datastrore changed, but was not detected by diff algorithms and provided to validate callbacks.
|
* Eg if YANG is `choice c { leaf x; leaf y }` and XML changed from `<x>42</x>` to `<y>42</y>` the datastrore changed, but was not detected by diff algorithms and provided to validate callbacks.
|
||||||
|
|
|
||||||
|
|
@ -407,17 +407,18 @@ cli_xml2cli(cxobj *xn,
|
||||||
(*fn)(stdout, "\n");
|
(*fn)(stdout, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For lists, print cbpre before its elements */
|
||||||
|
if (yang_keyword_get(ys) == Y_LIST)
|
||||||
|
(*fn)(stdout, "%s\n", cbuf_get(cbpre));
|
||||||
/* Then loop through all other (non-keys) */
|
/* Then loop through all other (non-keys) */
|
||||||
xe = NULL;
|
xe = NULL;
|
||||||
while ((xe = xml_child_each(xn, xe, -1)) != NULL){
|
while ((xe = xml_child_each(xn, xe, -1)) != NULL){
|
||||||
if (yang_keyword_get(ys) == Y_LIST){
|
if (yang_keyword_get(ys) == Y_LIST){
|
||||||
if ((match = yang_key_match(ys, xml_name(xe))) < 0)
|
if ((match = yang_key_match(ys, xml_name(xe))) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (match){
|
if (match)
|
||||||
(*fn)(stdout, "%s\n", cbuf_get(cbpre));
|
|
||||||
continue; /* Not key itself */
|
continue; /* Not key itself */
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (cli_xml2cli(xe, cbuf_get(cbpre), gt, fn) < 0)
|
if (cli_xml2cli(xe, cbuf_get(cbpre), gt, fn) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue