* 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:
parent
72dd31395e
commit
c64878fd4a
58 changed files with 293 additions and 199 deletions
|
|
@ -52,7 +52,11 @@ module clixon-config {
|
|||
CLICON_RESTCONF_HTTPS_PORT
|
||||
CLICON_SSL_SERVER_CERT
|
||||
CLICON_SSL_SERVER_KEY
|
||||
CLICON_SSL_CA_CERT";
|
||||
CLICON_SSL_CA_CERT
|
||||
CLICON_TRANSACTION_MOD
|
||||
Marked as obsolete and moved to clixon-restconf.yang:
|
||||
CLICON_RESTCONF_PATH
|
||||
CLICON_RESTCONF_PRETTY";
|
||||
}
|
||||
revision 2020-11-03 {
|
||||
description
|
||||
|
|
@ -428,7 +432,10 @@ module clixon-config {
|
|||
type string;
|
||||
description
|
||||
"Location of restconf (frontend) .so plugins. Load all .so
|
||||
plugins in this dir as restconf code plugins";
|
||||
plugins in this dir as restconf code plugins
|
||||
Note: This cannot be moved to clixon-restconf.yang because it is needed
|
||||
early in the bootstrapping phase, before clixon-restconf.yang config may
|
||||
be loaded.";
|
||||
}
|
||||
leaf CLICON_RESTCONF_PATH {
|
||||
type string;
|
||||
|
|
@ -436,8 +443,11 @@ module clixon-config {
|
|||
description
|
||||
"FastCGI unix socket. Should be specified in webserver
|
||||
Eg in nginx: fastcgi_pass unix:/www-data/clicon_restconf.sock
|
||||
Only if with-restconf=fcgi, NOT evhtp";
|
||||
Only if with-restconf=fcgi, NOT evhtp
|
||||
Note: Obsolete, use fcgi-socket in clixon-restconf.yang instead";
|
||||
status obsolete;
|
||||
}
|
||||
|
||||
leaf CLICON_RESTCONF_PRETTY {
|
||||
type boolean;
|
||||
default true;
|
||||
|
|
@ -449,7 +459,9 @@ module clixon-config {
|
|||
to get return value in XML or JSON.
|
||||
RFC 8040 examples print XML and JSON in pretty-printed form.
|
||||
Setting this value to false makes restconf return not pretty-printed
|
||||
which may be desirable for performance or tests";
|
||||
which may be desirable for performance or tests
|
||||
Note: Obsolete, use pretty in clixon-restconf.yang instead";
|
||||
status obsolete;
|
||||
}
|
||||
leaf CLICON_CLI_DIR {
|
||||
type string;
|
||||
|
|
@ -775,14 +787,6 @@ module clixon-config {
|
|||
type startup_mode;
|
||||
description "Which method to boot/start clicon backend";
|
||||
}
|
||||
leaf CLICON_TRANSACTION_MOD {
|
||||
type boolean;
|
||||
default false;
|
||||
description "If set, modifications in validation and commit
|
||||
callbacks are written back into the datastore.
|
||||
This is a bad idea and therefore obsoleted.";
|
||||
status obsolete;
|
||||
}
|
||||
leaf CLICON_NACM_MODE {
|
||||
type nacm_mode;
|
||||
default disabled;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,15 @@ module clixon-restconf {
|
|||
description
|
||||
"Initial release";
|
||||
}
|
||||
feature fcgi {
|
||||
description
|
||||
"This feature indicates that the restconf server supports the fast-cgi reverse
|
||||
proxy solution.
|
||||
That is, a reverse proxy is the HTTP front-end and the restconf daemon listens
|
||||
to a fcgi socket.
|
||||
The alternative is the internal HTTP solution using evhtp.";
|
||||
}
|
||||
|
||||
typedef http-auth-type {
|
||||
type enumeration {
|
||||
enum none {
|
||||
|
|
@ -125,6 +134,30 @@ module clixon-restconf {
|
|||
type uint32;
|
||||
default 0;
|
||||
}
|
||||
leaf pretty {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"Restconf return value pretty print.
|
||||
Restconf clients may add HTTP header:
|
||||
Accept: application/yang-data+json, or
|
||||
Accept: application/yang-data+xml
|
||||
to get return value in XML or JSON.
|
||||
RFC 8040 examples print XML and JSON in pretty-printed form.
|
||||
Setting this value to false makes restconf return not pretty-printed
|
||||
which may be desirable for performance or tests
|
||||
This replaces the CLICON_RESTCONF_PRETTY option in clixon-config.yang";
|
||||
}
|
||||
leaf fcgi-socket {
|
||||
if-feature fcgi;
|
||||
type string;
|
||||
default "/www-data/fastcgi_restconf.sock";
|
||||
description
|
||||
"FastCGI unix socket. Should be specified in webserver
|
||||
Eg in nginx: fastcgi_pass unix:/www-data/clicon_restconf.sock
|
||||
Only if with-restconf=fcgi, NOT evhtp
|
||||
This replaces CLICON_RESTCONF_PATH option in clixon-config.yang";
|
||||
}
|
||||
list socket {
|
||||
key "namespace address port";
|
||||
leaf namespace {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue