Commit graph

  • 8469a0962e * Add multiple yang support also for obsolete versions * This means that files and datastores supporting modstate also looks for deleted or updated yang modules. * A stricter binding which gives error if loading outdated YANG file does not exist. * Stricter yang checks: you cannot do get-config on datastores that have obsolete YANG * Added xerr output parameter to xmldb_get0() Olof hagsand 2021-03-16 15:25:34 +01:00
  • d542cd5530 Add cli debug commands for cli/backend/restconf Olof hagsand 2021-04-12 12:38:16 +02:00
  • 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 Olof hagsand 2021-04-11 17:36:22 +02:00
  • 9f5176adf5 Fix: Restconf service did not close when restconf config was removed Olof hagsand 2021-04-09 12:34:41 +02:00
  • 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 Olof hagsand 2021-04-08 22:40:41 +02:00
  • b938c0c40c yang container add support for cl:autocli-op jxm 2021-04-09 15:27:37 +08:00
  • 244060fddc - Added specific WITH_RESTCONF compile contants for _NATIVE and _FCGI for C code - Restconf auth=none changes - Load clixon-restconf and resolve features earlier so that config features work - Removed auth=none code from example (this was non-std half-baked basic auth) - Changed tests that used auth-type=none to enable feature clixon-restconf:allow-auth-none - Moved cert creation from sub-shell to servercert function - Fixed typos for dockerfile rename of restconf evhtp to native Olof hagsand 2021-04-07 20:33:58 +02:00
  • 2bf75158a6
    Merge pull request #194 from dcornejo/master Olof Hagsand 2021-04-07 10:31:20 +02:00
  • aeba2496c3
    Merge pull request #197 from s-bauer/master Olof Hagsand 2021-04-07 10:25:34 +02:00
  • 692dc12c03 * Fixed ["aux" folder issue with Windows. #198](https://github.com/clicon/clixon/issues/198) * Updated config scripts * removed unused expand_dir util cli function * Fixed again [making cli_show_options's output more human readable #199](https://github.com/clicon/clixon/issues/199) Olof hagsand 2021-04-07 09:41:49 +02:00
  • 7412bb7b3d Fixed [changing interface name not support with openconfig module #195](https://github.com/clicon/clixon/issues/195) Olof hagsand 2021-04-06 22:36:46 +02:00
  • d8be601606 * To configure native mode use: configure --with-restconf=native, changed from: configure --with-restconf=evhtp Olof hagsand 2021-04-06 08:48:45 +02:00
  • d874a696f7 Shortened ssl test keys to 1024 to make tests faster Fixed memory error in SSL code Olof hagsand 2021-04-05 12:24:05 +02:00
  • 6a64cf5ff1 Restconf: nonblocking constant and fixed an accept again loop error Olof hagsand 2021-04-03 10:37:29 +02:00
  • 3e2e4646f0 Restconf: nonblocking constant and fixed an accept again loop error Olof hagsand 2021-04-03 10:37:29 +02:00
  • 01d0ea905c Added nonblocking socket support for SSL_read/SSL_accept/SSL_write Olof hagsand 2021-04-02 18:06:45 +02:00
  • 698625aa65 evhtp configure and warnings Olof hagsand 2021-04-02 13:09:53 +02:00
  • 2def5d2367 * Fixed Yang parsing of comments in (extension) unknown statements, to allow multiple white space * Fixed cli_start_shell: comments and cli_error * Fixed [making cli_show_options's output more human readable #199](https://github.com/clicon/clixon/issues/199) * Fixed SSL/evhtp limited read buffer problem Olof hagsand 2021-04-01 12:41:36 +02:00
  • 0020c7ff3f cicd test fixes for libevhtp and warnings Olof hagsand 2021-04-01 11:20:48 +02:00
  • 61c1db72ab Merge branch 'master' of github.com:clicon/clixon Olof hagsand 2021-03-31 22:42:36 +02:00
  • e9df7b81f2 Building problems with evhtp Olof hagsand 2021-03-31 12:55:38 +02:00
  • 85fce86f50 Building problems with evhtp Olof hagsand 2021-03-31 12:55:38 +02:00
  • c7e7598e3b * Updated "evhtp" restconf mode * No reliance on libevent or libevhtp, but on libssl >= 1.1 directly * Moved out event handling to clixon event handling * Moved out all ssl calls to clixon * New code MUST use libevhtp from https://github.com/clixon/clixon-libevhtp.git * This does NOT work: libevhtp from https://github.com/criticalstack/libevhtp.git Olof hagsand 2021-03-19 09:39:55 +01:00
  • 95a820c862 clicon_err: Missed print strerr due to category error. Olof hagsand 2021-03-30 14:26:22 +02:00
  • 80c6bc17f0 fix: Build breaks when using --without-restconfig Simon Bauer 2021-03-28 20:21:50 +02:00
  • 477059f33d Fixed again: [backend start resconf failed due to path string truncated #192](https://github.com/clicon/clixon/issues/192) Olof hagsand 2021-03-24 12:23:00 +01:00
  • d7fde95774 Make authentication-type none a configurable feature Dave Cornejo 2021-03-23 19:54:31 -10:00
  • 709459304f * Removed cli_debug(). Use cli_debug_backend() or cli_debug_restconf() instead. * Created restconf debug rpc stub function and documented restconf debugging Olof hagsand 2021-03-22 14:56:05 +01:00
  • 6d23963d8b Fixed: [clixon_restconf not properly configed and started by clixon_backend #193](clixon_restconf not properly configed and started by clixon_backend #193) Olof hagsand 2021-03-22 12:20:52 +01:00
  • 5ec8965d18 Fixed: [backend start resconf failed due to path string truncated #192](https://github.com/clicon/clixon/issues/192) Olof hagsand 2021-03-22 12:16:52 +01:00
  • 43db8dd5c5 Fixed: [state showing error in cli with CLICON_STREAM_DISCOVERY_RFC8040 #191](https://github.com/clicon/clixon/issues/191) Olof hagsand 2021-03-18 10:41:08 +01:00
  • afdf6ffcf8 Fixed: [state showing error in cli with CLICON_STREAM_DISCOVERY_RFC8040 #191](https://github.com/clicon/clixon/issues/191) Olof hagsand 2021-03-18 09:43:13 +01:00
  • f8830dc27e Fixed: [yang submodule show error in modules-state #190](yang submodule show error in modules-state #190) Olof hagsand 2021-03-17 15:44:45 +01:00
  • fb9917e81e * Removed endtag parameter of clixon_xml_parse_file() Olof hagsand 2021-03-15 13:24:27 +01:00
  • f536b1dc67 Added: CLICON_CLI_AUTOCLI_EXCLUDE Added openconfig interfaces tests Olof hagsand 2021-03-15 13:08:42 +01:00
  • 1f5e71512a mem leaks in netconf hello Olof hagsand 2021-03-13 17:50:43 +01:00
  • 9087694b58 Fixed: [Backend can not read datastore with container named config #147](https://github.com/clicon/clixon/issues/147) Olof hagsand 2021-03-13 17:15:00 +01:00
  • 07d196dfd0 Added several fields to process-control status operation: active, description, command, status, starttime, pid Olof hagsand 2021-03-12 17:22:22 +01:00
  • 7e9a207ab2 * New clixon-lib@2020-03-08.yang revision * Changed: RPC process-control output to choice dependent on operation Olof hagsand 2021-03-12 12:10:25 +01:00
  • 7762b10cbb * Changed signal handling * Moved clixon-proc sigchild handling from handler to clixon_events Olof hagsand 2021-03-11 11:18:57 +01:00
  • dea3962cc0 * Fixed: [The config false leaf shouldn't be configed in startup stage #189](https://github.com/clicon/clixon/issues/189) Olof hagsand 2021-03-11 09:11:14 +01:00
  • f01efaf02a fixed fcgi notification, genmodel Olof hagsand 2021-03-10 14:45:18 +01:00
  • 5692072d36 * Fixed: [CLIXON is not waiting for the hello message #184](https://github.com/clicon/clixon/issues/184) * Hello message semantics has been made stricter according to RFC 6241 Sec 8.1, for example: * A client MUST send a <hello> element. * Each peer MUST send at least the base NETCONF capability, "urn:ietf:params:netconf:base:1.1" (or 1.0 for RFC 4741) * The netconf client will terminate (close the socket) if the client does not comply * You can set CLICON_NETCONF_HELLO_OPTIONAL to true to use the old behavior of essentially ignoring hellos. * New clixon-config@2020-03-08.yang revision * Added: CLICON_NETCONF_HELLO_OPTIONAL * The base capability has been changed to "urn:ietf:params:netconf:base:1.1" following RFC6241. Olof hagsand 2021-03-10 13:56:53 +01:00
  • 608f298ed9 * Fixed: [comma in yang list name will lead to cli setting error #186](https://github.com/clicon/clixon/issues/186) Olof hagsand 2021-03-08 12:37:47 +01:00
  • a8d29b1e7e * 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: not handled, 1: OK * For more info see [clixon-docs/restconf](https://clixon-docs.readthedocs.io/en/latest/restconf.html) Olof hagsand 2021-03-07 15:34:26 +01:00
  • 699115736d NETCONF README: https://github.com/clicon/clixon/issues/185 Olof hagsand 2021-03-07 15:29:33 +01:00
  • c2f07fd29c test fixes: mod timer for arm and install libevhtp lin in /us/lib Olof hagsand 2021-03-06 17:04:31 +01:00
  • b7991d9b39 * Made a separate Clixon datastore XML/JSON top-level symbol * Replaces the hardcoded "config" keyword. * Implemented by a compile-time option called DATASTORE_TOP_SYMBOL option in clixon_custom.h * Tests: added endtest to all tests. Removed all premature exits if BE=0 Olof hagsand 2021-03-05 14:15:15 +01:00
  • 2ab90d847b Restart restconf daemon only if restconf config is edited (not all) Olof hagsand 2021-03-05 13:11:04 +01:00
  • e8cd587ded Changed libevhtp tests to compile from clicon instead of criticalstack Olof hagsand 2021-03-03 16:01:29 +01:00
  • 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. Olof hagsand 2021-03-02 12:24:07 +01:00
  • 46ebc12bd5 5.1.0.PRE Olof hagsand 2021-03-02 12:00:08 +01:00
  • 08e212efef fixing version dependencies in tests Olof hagsand 2021-02-27 11:36:20 +01:00
  • 2d141b7dff Clixon 5.0 Olof hagsand 2021-02-27 11:04:40 +01:00
  • 0fe8acd301 wait.h->sys/wait.h, restconf_rpc wait in test Olof hagsand 2021-02-26 11:50:15 +01:00
  • d5edd64257 If a signal handler runs during select() loop in clixon_event_loop() and unless the signal handler sets clixon_exit, the select will be restarted. Olof hagsand 2021-02-25 22:35:13 +01:00
  • c509868345 Look for symbols in plugins using instead of for more portable use Olof hagsand 2021-02-25 21:59:33 +01:00
  • 84ac4a1e49 modified CHANGELOG for 5.0, improved some logs Olof hagsand 2021-02-25 21:58:57 +01:00
  • e1e391ad0d * Fixed: [Recursive calling xml_apply_ancestor is no need #180](https://github.com/clicon/clixon/issues/180) Olof hagsand 2021-02-23 15:33:53 +01:00
  • 2a4de52e56 * Added support for the following XPATH functions: * false, true * Fixed: [Negation operator in 'must' statement makes backend segmentation fault](https://github.com/clicon/clixon/issues/179) Olof hagsand 2021-02-23 15:24:39 +01:00
  • ab18946880 * Fixed extension/unknown problem shown in latest openconfig where other than a single space was used between the unknown identifier and string * Removed skiplist of openconfig/yangmodels tests to inside the test Olof hagsand 2021-02-23 13:45:46 +01:00
  • 187da4dc47 test yangmodels typo Olof Hagsand 2021-02-22 20:46:19 +00:00
  • 3d07db24d9 * Added CLICON_ANONYMOUS_USER to clicon-config.yang * evhtp restconf closes session on -1 fatal error (no hang) * restconf auth-type=none call ca_auth callback * main example for auth_type=none uses basic auth to get user but without passwd check Olof hagsand 2021-02-21 14:48:12 +01:00
  • f97b03efc8 new debug code for yang parser Olof hagsand 2021-02-19 16:20:57 +01:00
  • 9840e248c6 * Augment target node check strict, instead of printing a warning, it will terminate with error. * Fixed: [Augment that reference a submodule as target node fails #178](https://github.com/clicon/clixon/issues/178) * Fixed a memory error that was reported in slack by Pawel Maslanka * The crash printout was: realloc(): invalid next size Aborted Olof hagsand 2021-02-19 15:46:55 +01:00
  • 108f94cfad * Fixed: [Irregular ordering of cli command + help text when integer is a part of command #176](https://github.com/clicon/clixon/issues/176) * Enabled by default cligen_lexicalorder_set() using strversmp instead of strcmp Olof hagsand 2021-02-17 13:34:56 +01:00
  • e3aa17458c Implemented: [Simplifying error messages for regex validations. #174](https://github.com/clicon/clixon/issues/174) Olof hagsand 2021-02-16 20:58:43 +01:00
  • dee4e87edf Fixed [xml bind yang error in xml_bind_yang_rpc_reply #175](https://github.com/clicon/clixon/issues/175) Olof hagsand 2021-02-16 17:21:33 +01:00
  • a129756c6c Fixed: [Is there an error with plugin's ca_interrupt setting ? #173](https://github.com/clicon/clixon/issues/173) Olof hagsand 2021-02-15 12:54:09 +01:00
  • d1e5599572 reorder clixon-restconf.yang and some test fixes Olof Hagsand 2021-02-14 14:48:52 +00:00
  • dcc19d3edf test fixes: ssh clalhome centos8, auth mem-leak, etc Olof Hagsand 2021-02-14 10:36:33 +00:00
  • f7d4df01a6 restconf test fixes for freebsd and others Olof Hagsand 2021-02-11 14:47:54 +00:00
  • c64878fd4a * 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 Olof hagsand 2021-02-11 13:46:34 +01:00
  • 72dd31395e fixed tests after updates Olof hagsand 2021-02-10 20:48:57 +01:00
  • 6b08a22f04 * RESTCONF failed authentication changed error return code from 403 Forbiden to 401 Unauthorized following RFC 8040 Olof hagsand 2021-02-10 14:17:34 +01:00
  • 92a3898c46 TSL->TLS, updated slack link, callhome docs Olof hagsand 2021-02-09 21:36:01 +01:00
  • 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 Olof hagsand 2021-02-09 21:15:54 +01:00
  • 1f0147f996 removed unnecessary strerror() in clixon_err() calls; added 'function' keyword in all function declarations in the test scripts Olof hagsand 2021-02-04 12:04:48 +01:00
  • 73414e2ece * NETCONF Call Home Call Home RFC 8071 * Solution description using openssh and utility functions, no changes to core clixon * Example: test/test_netconf_ssh_callhome.sh * RESTCONF Call home not done Olof hagsand 2021-02-04 11:19:23 +01:00
  • 40008f182e Fix restart of restconf processes Olof hagsand 2021-02-01 10:44:50 +01:00
  • f65efa3e5e Add ca_reset plugin also when backend starts as -s none Olof hagsand 2021-01-31 19:40:59 +01:00
  • 200e258ded mv stream->restconf_notif, cli-auto test change for grouping/extension bug Olof hagsand 2021-01-28 11:27:07 +01:00
  • 8f68f601d4 Fixed persistent socket for notifications Olof hagsand 2021-01-28 11:18:04 +01:00
  • 0b1e4ab0e9 Fixed: unknown nodes (for extenstions) did not work when placed directly under a grouping clause Olof hagsand 2021-01-28 09:02:29 +01:00
  • f5f013c739 * Corrected client session handling to make internal IPC socket persistent * Applies to cli/netconf/restconf/client-api code * Previous behaviour: * Close socket after each rpc, but now keeps the socket open until the client terminates * Kept locks over socket life-cycle, but according to RFC 6241 7.5 a lock should be relaeased when session ends Olof hagsand 2021-01-27 15:07:27 +01:00
  • b41f68b677 debug print of backend state, split test-stream into a netconf and restconf part, change restconf yang auth-type from leaf-list to leaf Olof hagsand 2021-01-27 14:40:34 +01:00
  • a5f32fbedf * Restconf evhtp using network namespaces implemented Olof hagsand 2021-01-26 17:33:24 +01:00
  • 3fe218da2e New clixon_client API for external access Olof hagsand 2021-01-22 14:50:07 +01:00
  • 94c6bd9c49 Added proc socket and text proto rpc Olof hagsand 2021-01-22 14:41:47 +01:00
  • 68371d4fc5 upgrade copyright, aux tools, etc Olof hagsand 2021-01-21 12:23:46 +01:00
  • 2d402b7ba5 Added validation of clixon-restconf.yang: server-key-path and server-cert-path must be present if ssl enabled. Olof hagsand 2021-01-21 12:11:26 +01:00
  • f1449a2542 test error Olof hagsand 2021-01-15 14:21:06 +01:00
  • f0325d989e Fixed: [Behaviour of Empty LIST Input in RESTCONF JSON #166](https://github.com/clicon/clixon/issues/166) Olof hagsand 2021-01-15 13:49:40 +01:00
  • 96b50b88e8 Copyright 2021 Olof hagsand 2021-01-13 14:40:34 +01:00
  • a7e11c75d8 Merge branch 'baruchsiach-fix-netconf-startup-validate' Olof hagsand 2021-01-13 11:23:46 +01:00
  • 5337619af8 Merge branch 'fix-netconf-startup-validate' of https://github.com/baruchsiach/clixon into baruchsiach-fix-netconf-startup-validate Olof hagsand 2021-01-13 11:15:10 +01:00
  • d914495ab4 Fixed a bug where clicon_debug_init interfered with clicon_log_file Olof hagsand 2021-01-13 11:11:50 +01:00
  • c269d094e4 * Experimental IPC API, clixon_client, to support a loose integration model * Many systems using other tools employ such a model, and this API is an effort to make a usage of clixon easier * see https://clixon-docs.readthedocs.io/en/latest/overview.html#loose-integration * This is work-in-progress and is expected to change Olof hagsand 2021-01-12 14:08:35 +01:00
  • 2a392ca0e9 * rpc msg C API rearranged to separate socket/connect from connect Olof hagsand 2021-01-12 14:03:07 +01:00
  • 8cde7a4ded * Handling empty netconf XML messages "]]>]]>" is changed from being accepted to return an error. * Netconf split lines input (input fragments) fixed * Netconf input split on several lines, eg using stdin: "<a>\nfoo</a>]]>]]>" could under some circumstances be split so that only "</a>]]>]]>" be properly processed. This could also happen to a socket receiving a sub-string and then after a delay receive the rest. * Fixed by storing residue and add that to the input string if later input is received on the same socket. * Use [https://github.com/clicon/libevhtp](https://github.com/clicon/libevhtp) instead of [https://github.com/criticalstack/libevhtp](https://github.com/criticalstack/libevhtp) as a source of the evhtp source Olof hagsand 2021-01-07 16:57:47 +01:00