First working prototype
This commit is contained in:
parent
6b357dc038
commit
2e857bb417
16 changed files with 968 additions and 28 deletions
|
|
@ -275,6 +275,7 @@ api_return_err(clicon_handle h,
|
|||
switch (media){
|
||||
case YANG_DATA_XML:
|
||||
case YANG_PATCH_XML:
|
||||
case YANG_COLLECTION_XML:
|
||||
clicon_debug(1, "%s code:%d", __FUNCTION__, code);
|
||||
if (pretty){
|
||||
cprintf(cb, " <errors xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\">\n");
|
||||
|
|
@ -291,6 +292,7 @@ api_return_err(clicon_handle h,
|
|||
break;
|
||||
case YANG_DATA_JSON:
|
||||
case YANG_PATCH_JSON:
|
||||
case YANG_COLLECTION_JSON:
|
||||
clicon_debug(1, "%s code:%d", __FUNCTION__, code);
|
||||
if (pretty){
|
||||
cprintf(cb, "{\n\"ietf-restconf:errors\" : ");
|
||||
|
|
@ -306,9 +308,7 @@ api_return_err(clicon_handle h,
|
|||
cprintf(cb, "}\r\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
clicon_err(OE_YANG, EINVAL, "Invalid media type %d", media);
|
||||
goto done;
|
||||
default: /* Just ignore the body so that there is a reply */
|
||||
break;
|
||||
} /* switch media */
|
||||
assert(cbuf_len(cb));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue