Fixed: ["autocli:hide-show" extension cause bug in xmldb_put method #343](https://github.com/clicon/clixon/issues/343)
As a side-effect, added extra "autocliext" parameter to: - clixon_xml2file() - clixon_json2file() - clixon_json2cbuf() - clixon_txt2file()
This commit is contained in:
parent
e724dd7f40
commit
4514f2a538
26 changed files with 213 additions and 144 deletions
|
|
@ -452,17 +452,17 @@ cli_auto_show(clicon_handle h,
|
|||
/* Print configuration according to format */
|
||||
switch (format){
|
||||
case FORMAT_XML:
|
||||
if (clixon_xml2file(stdout, xp, 0, pretty, cligen_output, skiproot) < 0)
|
||||
if (clixon_xml2file(stdout, xp, 0, pretty, cligen_output, skiproot, 1) < 0)
|
||||
goto done;
|
||||
fprintf(stdout, "\n");
|
||||
break;
|
||||
case FORMAT_JSON:
|
||||
if (clixon_json2file(stdout, xp, pretty, cligen_output, skiproot) < 0)
|
||||
if (clixon_json2file(stdout, xp, pretty, cligen_output, skiproot, 1) < 0)
|
||||
goto done;
|
||||
fprintf(stdout, "\n");
|
||||
break;
|
||||
case FORMAT_TEXT:
|
||||
if (clixon_txt2file(stdout, xp, 0, cligen_output, skiproot) < 0)
|
||||
if (clixon_txt2file(stdout, xp, 0, cligen_output, skiproot, 1) < 0)
|
||||
goto done;
|
||||
break;
|
||||
case FORMAT_CLI:
|
||||
|
|
@ -474,7 +474,7 @@ cli_auto_show(clicon_handle h,
|
|||
NETCONF_BASE_NAMESPACE, NETCONF_MESSAGE_ID_ATTR);
|
||||
if (pretty)
|
||||
fprintf(stdout, "\n");
|
||||
if (clixon_xml2file(stdout, xp, 2, pretty, cligen_output, skiproot) < 0)
|
||||
if (clixon_xml2file(stdout, xp, 2, pretty, cligen_output, skiproot, 1) < 0)
|
||||
goto done;
|
||||
fprintf(stdout, "</config></edit-config></rpc>]]>]]>\n");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue