- Moved yang patch code to new files restconf_methods_patch.[ch]

- Started modifying patch code to style guidelines
- Made patch test independent of example
- Added developers style guidelines
This commit is contained in:
Olof hagsand 2021-08-15 20:38:45 +02:00
parent 629757d1fd
commit 8db716ca07
15 changed files with 954 additions and 2098 deletions

View file

@ -178,10 +178,12 @@ api_root_restconf_exact(clicon_handle h,
goto done;
switch (media_out){
case YANG_DATA_XML:
case YANG_PATCH_XML:
if (clicon_xml2cbuf(cb, xt, 0, pretty, -1) < 0)
goto done;
break;
case YANG_DATA_JSON:
case YANG_PATCH_JSON:
if (xml2json_cbuf(cb, xt, pretty) < 0)
goto done;
break;
@ -256,10 +258,12 @@ api_yang_library_version(clicon_handle h,
}
switch (media_out){
case YANG_DATA_XML:
case YANG_PATCH_XML:
if (clicon_xml2cbuf(cb, xt, 0, pretty, -1) < 0)
goto done;
break;
case YANG_DATA_JSON:
case YANG_PATCH_JSON:
if (xml2json_cbuf(cb, xt, pretty) < 0)
goto done;
break;