* Fixed: Configure option CLICON_RESTCONF_PATH was marked as obsolete but was still used.
* `CLICON_RESTCONF_PATH` is now obsolete for sure
* Instead if you use fgci/nginx:
* Use `restconf/fcgi-socket`
* Ensure `<CLICON_FEATURE>clixon-restconf:fcgi</CLICON_FEATURE>` is set
* Added default values to restconf-config and save fcgi-socket-path in memory
This commit is contained in:
parent
1808015cf6
commit
50ac510803
10 changed files with 163 additions and 96 deletions
|
|
@ -754,7 +754,15 @@ restconf_config_init(clicon_handle h,
|
|||
char *bstr;
|
||||
cvec *nsc = NULL;
|
||||
int auth_type;
|
||||
|
||||
yang_stmt *yspec;
|
||||
|
||||
if ((yspec = clicon_dbspec_yang(h)) == NULL){
|
||||
clicon_err(OE_FATAL, 0, "No DB_SPEC");
|
||||
goto done;
|
||||
}
|
||||
/* Apply default values (removed in clear function) */
|
||||
if (xml_default_recurse(xrestconf, 0) < 0)
|
||||
goto done;
|
||||
if ((x = xpath_first(xrestconf, nsc, "enable")) != NULL &&
|
||||
(enable = xml_body(x)) != NULL){
|
||||
if (strcmp(enable, "false") == 0){
|
||||
|
|
@ -778,6 +786,11 @@ restconf_config_init(clicon_handle h,
|
|||
else if (strcmp(bstr, "false") == 0)
|
||||
restconf_pretty_set(h, 0);
|
||||
}
|
||||
if ((x = xpath_first(xrestconf, nsc, "fcgi-socket")) != NULL &&
|
||||
(bstr = xml_body(x)) != NULL){
|
||||
if (restconf_fcgi_socket_set(h, bstr) < 0)
|
||||
goto done;
|
||||
}
|
||||
retval = 1;
|
||||
done:
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue