* [Need an option to disable restconf mandatory action of overwriting startup_db #230](https://github.com/clicon/clixon/issues/230)
* Disable RFC 8040 mandatory copy of running to startup after commit * Rename CLICON_RESTCONF_INSTALL_DIR -> CLICON_RESTCONF_INSTALLDIR
This commit is contained in:
parent
60c9172d21
commit
5b39418e92
8 changed files with 53 additions and 25 deletions
|
|
@ -202,12 +202,12 @@ restconf_pseudo_process_control(clicon_handle h)
|
|||
clicon_err(OE_UNIX, errno, "cbuf_new");
|
||||
goto done;
|
||||
}
|
||||
/* CLICON_RESTCONF_INSTALL_DIR is where we think clixon_restconf is installed
|
||||
/* CLICON_RESTCONF_INSTALLDIR is where we think clixon_restconf is installed
|
||||
* Problem is where to define it? Now in config file, but maybe it should be in configure?
|
||||
* Tried Makefile but didnt work on Docker since it was moved around.
|
||||
* Use PATH?
|
||||
*/
|
||||
cprintf(cb, "%s/clixon_restconf", clicon_option_str(h, "CLICON_RESTCONF_INSTALL_DIR"));
|
||||
cprintf(cb, "%s/clixon_restconf", clicon_option_str(h, "CLICON_RESTCONF_INSTALLDIR"));
|
||||
argv[i++] = cbuf_get(cb);
|
||||
argv[i++] = "-f";
|
||||
argv[i++] = clicon_option_str(h, "CLICON_CONFIGFILE");
|
||||
|
|
|
|||
|
|
@ -522,8 +522,11 @@ api_data_write(clicon_handle h,
|
|||
* configuration datastore, after the "running" datastore has been altered
|
||||
* as a consequence of a RESTCONF edit operation.
|
||||
*/
|
||||
if ((IETF_DS_NONE == ds) && if_feature(yspec, "ietf-netconf", "startup"))
|
||||
if ((IETF_DS_NONE == ds) &&
|
||||
if_feature(yspec, "ietf-netconf", "startup") &&
|
||||
!clicon_option_bool(h, "CLICON_RESTCONF_STARTUP_DONTUPDATE")){
|
||||
cprintf(cbx, " copystartup=\"true\"");
|
||||
}
|
||||
cprintf(cbx, " autocommit=\"true\"");
|
||||
cprintf(cbx, "><target><candidate /></target>");
|
||||
cprintf(cbx, "<default-operation>none</default-operation>");
|
||||
|
|
@ -760,8 +763,11 @@ api_data_delete(clicon_handle h,
|
|||
* configuration datastore, after the "running" datastore has been altered
|
||||
* as a consequence of a RESTCONF edit operation.
|
||||
*/
|
||||
if ((IETF_DS_NONE == ds) && if_feature(yspec, "ietf-netconf", "startup"))
|
||||
if ((IETF_DS_NONE == ds) &&
|
||||
if_feature(yspec, "ietf-netconf", "startup") &&
|
||||
!clicon_option_bool(h, "CLICON_RESTCONF_STARTUP_DONTUPDATE")){
|
||||
cprintf(cbx, " copystartup=\"true\"");
|
||||
}
|
||||
cprintf(cbx, " autocommit=\"true\"");
|
||||
cprintf(cbx, "><target><candidate /></target>");
|
||||
cprintf(cbx, "<default-operation>none</default-operation>");
|
||||
|
|
|
|||
|
|
@ -346,8 +346,11 @@ api_data_post(clicon_handle h,
|
|||
* configuration datastore, after the "running" datastore has been altered
|
||||
* as a consequence of a RESTCONF edit operation.
|
||||
*/
|
||||
if ((IETF_DS_NONE == ds) && if_feature(yspec, "ietf-netconf", "startup"))
|
||||
if ((IETF_DS_NONE == ds) &&
|
||||
if_feature(yspec, "ietf-netconf", "startup") &&
|
||||
!clicon_option_bool(h, "CLICON_RESTCONF_STARTUP_DONTUPDATE")){
|
||||
cprintf(cbx, " copystartup=\"true\"");
|
||||
}
|
||||
cprintf(cbx, " autocommit=\"true\"");
|
||||
cprintf(cbx, "><target><candidate /></target>");
|
||||
cprintf(cbx, "<default-operation>none</default-operation>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue