* RESTCONF configuration is unified and moved from clixon-config.yang to clixon-restconf.yang

* Except `CLICON_RESTCONF_DIR` which remains in clixon-config.yang due to bootstrapping
    * -d <dir> option removed
  * This applies to both evhtp and fcgi RESTCONF
    * Both can also read config from backend, and be started from backend
  * You may need to move config as follows (from clixon-config.yang to clixon-restconf.yang)
    * CLICON_RESTCONF_PRETTY -> restconf/pretty
    * CLICON_RESTCONF_PATH -> restconf/fcgi-path
This commit is contained in:
Olof hagsand 2021-02-11 13:46:34 +01:00
parent 72dd31395e
commit c64878fd4a
58 changed files with 293 additions and 199 deletions

View file

@ -599,7 +599,6 @@ restconf_config_init(clicon_handle h,
goto disable;
}
}
/* get common fields */
if ((x = xpath_first(xrestconf, nsc, "auth-type")) != NULL &&
(bstr = xml_body(x)) != NULL){
@ -609,6 +608,16 @@ restconf_config_init(clicon_handle h,
}
restconf_auth_type_set(h, auth_type);
}
if ((x = xpath_first(xrestconf, nsc, "pretty")) != NULL &&
(bstr = xml_body(x)) != NULL){
/* XXX redirection to (obsolete) option, fix by replacing its accesses */
clicon_option_str_set(h, "CLICON_RESTCONF_PRETTY", bstr);
}
if ((x = xpath_first(xrestconf, nsc, "fcgi-socket")) != NULL &&
(bstr = xml_body(x)) != NULL){
/* XXX redirection to (obsolete) option, fix by replacing its accesses */
clicon_option_str_set(h, "CLICON_RESTCONF_PATH", bstr);
}
retval = 1;
done:
return retval;