Added support for yang presence and no-presence containers.

This commit is contained in:
Olof hagsand 2017-07-23 12:59:02 +02:00
parent e56cf607a3
commit e5b625e722
19 changed files with 188 additions and 104 deletions

View file

@ -242,14 +242,9 @@ from_client_get_config(clicon_handle h,
goto ok;
}
cprintf(cbret, "<rpc-reply><data>");
if (xret!=NULL){
if (xml_child_nr(xret)){
if (xml_name_set(xret, "config") < 0)
goto done;
if (clicon_xml2cbuf(cbret, xret, 0, 0) < 0)
goto done;
}
}
if (xret!=NULL &&
clicon_xml2cbuf(cbret, xret, 0, 0) < 0)
goto done;
cprintf(cbret, "</data></rpc-reply>");
ok:
retval = 0;