Commit graph

15 commits

Author SHA1 Message Date
Olof hagsand
96a3ee98c6 Removed default of CLICON_RESTCONF_INSTALLDIR
* The default behaviour is changed to use the config $(sbindir) to locate `clixon_restconf` when starting restconf internally
2021-08-05 15:16:29 +03:00
Olof hagsand
ba45d6d2a1 Fixed memory leak in new candidate_validate function
Added error returns for clixon-lib process rpc empty returns
2021-06-23 10:50:47 +02:00
Olof hagsand
164aa1cb4c * Restconf: added inline configuration using -R <xml> command line as an alternative to making advanced restconf configuration 2021-05-26 11:24:39 +02:00
Olof hagsand
5b39418e92 * [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
2021-05-25 11:07:41 +02:00
Olof hagsand
c20c672d83 * Changed config and install options for Restconf
* clixon_restconf daemon is installed in /usr/local/sbin (as clixon_backend), instead of /www-data
    * `configure --with-wwwdir=<dir>` remains but only applies to fcgi socket and log
    * New option `CLICON_RESTCONF_INSTALL_DIR` is set to where clixon_restconf is installed, with default `/usr/local/sbin/`
  * Restconf drop privileges user is defined by `CLICON_RESTCONF_USER`
    * `configure --with-wwwuser=<user>` is removed
  * clixon_restconf drop of privileges is defined by `CLICON_RESTCONF_PRIVILEGES` option
* New clixon-restconf@2020-05-20.yang revision
  * Added: restconf `log-destination`
2021-05-23 17:14:18 +02:00
Olof hagsand
b88722fa25 - Restructure plugin module using a "module struct" rather than global variables.
This include plugin module init and exit functions
  New type: clixon_plugin_t exposed via public API while struct clixon_plugin is private
- Makefile changes for static linkage using "LINKAGE=static"
- Moved nacm external init to later stage in backend_main
2021-04-19 11:06:40 +02:00
Olof hagsand
953326d39f - Rewrote process control to simpler state model: stopped/running/exiting
- Stricter CLICON_BACKEND_RESTCONF_PROCESS :
 - if set, restconf daemon queries backend for its config
 - if not set, restconf daemon reads its config from main config file
2021-04-12 10:31:17 +02:00
Olof hagsand
9f5176adf5 Fix: Restconf service did not close when restconf config was removed 2021-04-09 13:47:05 +02:00
Olof hagsand
15d01c58d8 - Better restconf debug: when restconf debug flag set in datastore, ensure the process is started with -D set
- Fixed native http support for base container
- Changed test certs and restconf scripts to functions
2021-04-09 09:34:05 +02:00
Olof hagsand
477059f33d Fixed again: [backend start resconf failed due to path string truncated #192](https://github.com/clicon/clixon/issues/192) 2021-03-24 12:23:00 +01:00
Olof hagsand
5ec8965d18 Fixed: [backend start resconf failed due to path string truncated #192](https://github.com/clicon/clixon/issues/192) 2021-03-22 12:16:52 +01:00
Olof hagsand
07d196dfd0 Added several fields to process-control status operation: active, description, command, status, starttime, pid 2021-03-12 17:22:22 +01:00
Olof hagsand
2ab90d847b Restart restconf daemon only if restconf config is edited (not all) 2021-03-05 13:11:04 +01:00
Olof hagsand
b2f9c59a34 * Reverted blocked signal behavior introduced in 5.0.
* Introduced a delay before making process start/stop/restart processes for race conditions when configuring eg restconf
* For restconf `CLICON_BACKEND_RESTCONF_PROCESS`, restart restconf if restconf is edited.
2021-03-02 12:24:07 +01:00
Olof hagsand
710fc76887 * Restconf authentication callback (ca_auth) signature changed
* Not backward compatible: All uses of the ca-auth callback in restconf plugins must be changed
  * New version is: `int ca_auth(h, req, auth_type, authp, userp)`
    * where `auth_type` is the requested authentication-type (none, client-cert or user-defined)
    * `authp` is the returned authentication flag
    * `userp` is the returned associated authenticated user
    * and the return value is three-valued: -1: Error, 0: ignored, 1: OK
  * For more info see [clixon-docs](https://clixon-docs.readthedocs.io/en/latest/restconf.html)
* New clixon-restconf@2020-12-30.yang revision
2021-02-09 21:26:35 +01:00