- 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

@ -265,6 +265,7 @@ api_return_err(clicon_handle h,
goto done;
switch (media){
case YANG_DATA_XML:
case YANG_PATCH_XML:
clicon_debug(1, "%s code:%d", __FUNCTION__, code);
if (pretty){
cprintf(cb, " <errors xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\">\n");
@ -280,6 +281,7 @@ api_return_err(clicon_handle h,
}
break;
case YANG_DATA_JSON:
case YANG_PATCH_JSON:
clicon_debug(1, "%s code:%d", __FUNCTION__, code);
if (pretty){
cprintf(cb, "{\n\"ietf-restconf:errors\" : ");