Added new backend plugin callback: plugin_statedata() for getting state data; Added generic xml_merge() function.
This commit is contained in:
parent
f5d2473618
commit
4e986d6660
24 changed files with 600 additions and 88 deletions
|
|
@ -180,6 +180,16 @@ badrequest(FCGX_Request *r)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
notimplemented(FCGX_Request *r)
|
||||
{
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
FCGX_FPrintF(r->out, "Status: 501\r\n");
|
||||
FCGX_FPrintF(r->out, "Content-Type: text/html\r\n\r\n");
|
||||
FCGX_FPrintF(r->out, "<h1>Not Implemented/h1>\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
conflict(FCGX_Request *r)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ int restconf_err2code(char *tag);
|
|||
const char *restconf_code2reason(int code);
|
||||
int notfound(FCGX_Request *r);
|
||||
int badrequest(FCGX_Request *r);
|
||||
int notimplemented(FCGX_Request *r);
|
||||
int conflict(FCGX_Request *r);
|
||||
int clicon_debug_xml(int dbglevel, char *str, cxobj *cx);
|
||||
int test(FCGX_Request *r, int dbg);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ api_data_get_gen(clicon_handle h,
|
|||
goto done;
|
||||
}
|
||||
clicon_debug(1, "%s path:%s", __FUNCTION__, cbuf_get(path));
|
||||
if (clicon_rpc_get_config(h, "running", cbuf_get(path), &xret) < 0){
|
||||
if (clicon_rpc_get(h, cbuf_get(path), &xret) < 0){
|
||||
notfound(r);
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -541,8 +541,7 @@ api_data_patch(clicon_handle h,
|
|||
cvec *qvec,
|
||||
char *data)
|
||||
{
|
||||
badrequest(r);
|
||||
// return api_data_edit(h, r, api_path, pcvec, pi, qvec, data, OP_MERGE);
|
||||
notimplemented(r);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue