Fixed: ["show configuration devices" and "show configuration devices | display cli" differs](https://github.com/clicon/clixon-controller/issues/24)
This commit is contained in:
parent
3b636b51f0
commit
4a605ff25e
2 changed files with 17 additions and 10 deletions
|
|
@ -50,7 +50,8 @@ Expected: October 2023
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
* Fixed: [Openconfig configuration on Juniper MX does not work](https://github.com/clicon/clixon-controller/issues/20)
|
* Fixed: ["show configuration devices" and "show configuration devices | display cli" differs](https://github.com/clicon/clixon-controller/issues/24)
|
||||||
|
* Fixed: [Configuring Juniper PTX produces CLI errors](https://github.com/clicon/clixon-controller/issues/19)
|
||||||
* Fixed: CLI output pipes: Add CLICON_PIPETREE to any cli files, not just the first
|
* Fixed: CLI output pipes: Add CLICON_PIPETREE to any cli files, not just the first
|
||||||
|
|
||||||
## 6.3.0
|
## 6.3.0
|
||||||
|
|
|
||||||
|
|
@ -221,10 +221,11 @@ pipe_showas_fn(clicon_handle h,
|
||||||
cxobj *xt = NULL;
|
cxobj *xt = NULL;
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
enum format_enum format = FORMAT_XML;
|
enum format_enum format = FORMAT_XML;
|
||||||
int ybind = 1;
|
|
||||||
yang_stmt *yspec;
|
yang_stmt *yspec;
|
||||||
int pretty = 1;
|
int pretty = 1;
|
||||||
char *prepend = NULL;
|
char *prepend = NULL;
|
||||||
|
int ret;
|
||||||
|
cxobj *xerr = NULL;
|
||||||
|
|
||||||
if (cvec_len(argv) < 1 || cvec_len(argv) > 3){
|
if (cvec_len(argv) < 1 || cvec_len(argv) > 3){
|
||||||
clicon_err(OE_PLUGIN, EINVAL, "Received %d arguments. Expected:: <format> [<pretty> [<prepend>]]", cvec_len(argv));
|
clicon_err(OE_PLUGIN, EINVAL, "Received %d arguments. Expected:: <format> [<pretty> [<prepend>]]", cvec_len(argv));
|
||||||
|
|
@ -241,13 +242,16 @@ pipe_showas_fn(clicon_handle h,
|
||||||
if (cvec_len(argv) > argc){
|
if (cvec_len(argv) > argc){
|
||||||
prepend = cv_string_get(cvec_i(argv, argc++));
|
prepend = cv_string_get(cvec_i(argv, argc++));
|
||||||
}
|
}
|
||||||
if (ybind){
|
|
||||||
yspec = clicon_dbspec_yang(h);
|
yspec = clicon_dbspec_yang(h);
|
||||||
if (clixon_xml_parse_file(stdin, YB_MODULE, yspec, &xt, NULL) < 0)
|
/* Bind module with mtpoints requires h, but parse functions font have h */
|
||||||
|
if (clixon_xml_parse_file(stdin, YB_NONE, yspec, &xt, NULL) < 0)
|
||||||
|
goto done;
|
||||||
|
if ((ret = xml_bind_yang(h, xt, YB_MODULE, yspec, &xerr)) < 0)
|
||||||
|
goto done;
|
||||||
|
if (ret == 0){
|
||||||
|
clixon_netconf_error(xerr, "Parse top file", NULL);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
else if (clixon_xml_parse_file(stdin, YB_NONE, NULL, &xt, NULL) < 0)
|
|
||||||
goto done;
|
|
||||||
switch (format){
|
switch (format){
|
||||||
case FORMAT_XML:
|
case FORMAT_XML:
|
||||||
if (clixon_xml2file(stdout, xt, 0, pretty, NULL, cligen_output, 1, 0) < 0)
|
if (clixon_xml2file(stdout, xt, 0, pretty, NULL, cligen_output, 1, 0) < 0)
|
||||||
|
|
@ -270,6 +274,8 @@ pipe_showas_fn(clicon_handle h,
|
||||||
}
|
}
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
|
if (xerr)
|
||||||
|
xml_free(xerr);
|
||||||
if (xt)
|
if (xt)
|
||||||
xml_free(xt);
|
xml_free(xt);
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue