Commit graph

185 commits

Author SHA1 Message Date
Olof hagsand
f2810e849f Fork fcgi handler for streams 2018-11-04 14:46:15 +01:00
Olof hagsand
71eddeaa74 * Restconf stream notification support - two variants.
* Both a "native" stream support and one using nginx/nchan pub/sub.
  * See (apps/restconf/README.md) for details.
* clixon-config YAML file has new revision: 2018-10-21.
2018-10-21 22:19:38 +02:00
Olof hagsand
40cda7b6a4 * ietf-netconf yang module added with candidate, validate, startup and xpath features enabled.
* Added urn:ietf:params:netconf:capability:yang-library:1.0
* Thanks SCadilhac for helping out, see https://github.com/clicon/clixon/issues/39
* uri_percent_encode() and xml_chardata_encode() changed to use stdarg parameters
2018-10-17 22:36:59 +02:00
Olof hagsand
98f3cd0e32 * Major rewrite of event streams
* If you used old event callbacks API, you need to switch to the streams API
    * See clixon_stream.[ch]
  * Old streams API which needs to be removed include:
    * clicon_log_register_callback()
    * subscription_add() --> stream_register()
    * backend_notify() and backend_notify_xml() - use stream_notify() instead
* Example uses "NETCONF" stream instead of "ROUTING"
* Added timeout option -t for clixon_netconf - quit after max time.
2018-09-30 14:51:30 +02:00
Olof Hagsand
7c94991fe9 * clixon_restconf and clixon_netconf now take -D <level> as command-line option\
instead of just -D
  * This aligns to clixon_cli and clixon_backend
2018-08-03 13:24:41 +02:00
Olof hagsand
56e51f1a8d 3.8.0.PRE preparations and
* Obsoleted COMPAT_CLIV and COMPAT_XSL that were optional in 3.7
2018-07-22 21:29:21 +02:00
Olof hagsand
0eb9e6c8b2 * Support for YANG conditionals "must" and "when" according to RFC 7950 Sec 7.5.3 and 7.21.5
* XPATH checked at validation time
2018-07-18 09:51:33 +02:00
Olof hagsand
ba7f84afee * Much better support for XPATH 1.0 according to https://www.w3.org/TR/xpath-10 using yacc/lex
* NOTE: Due to an error in the previous implementation, all XPATH calls on the form `x[a=str]` where `str` is a string (not a number or XML symbol), must be changed to: `x[a='str'] or x[a="str"]`
    * This includes all calls to `xpath_vec, xpath_first`, etc.
    * All calls to cli_copy_config in CLI spec files must replace 2nd argument from `x[%s=%s]` to `x[%s='%s']`
  * The old API is stillenabled. To define the new, define XPATH_USE_NEW in include/clixon_custom.h and recompile
2018-07-17 16:59:32 +02:00
Olof hagsand
bf728b37b8 * Full support of XPATH 1.0 according to https://www.w3.org/TR/xpath-10 using yacc/lex
* The previous XPATH imlementation was very restricted.
  * The only function implemented is the Yang extension "current()". No other functions are implemented (eg last(), count()).
2018-07-16 16:13:31 +02:00
Olof hagsand
85c4782e36 Dedicated xml,json,yang and xsl parser utility programs added
Sanity check of stdarg (...) added
Cleanup of error messages.
2018-06-17 19:40:06 +02:00
Olof hagsand
7e4e1d6deb * Support for YANG identity and identityref according to RFC 7950 Sec 7.18 and 9.10
* Previous support did no validation of values.
  * Validation of types and CLI expansion
  * Example extended with inclusion of iana-if-type RFC 7224 interface identities
2018-06-03 15:36:05 +02:00
Olof hagsand
1ac57dedaf Some memleaks and last minute 3.6 release changes. 2018-04-29 18:35:06 +02:00
Olof hagsand
79e3fbdaa9 * Restructure and more generic plugin API (cli,backend,restconf,netconf)
* For preparation for authorization RFC8341
  * Plugins add clixon_plugin_init() and api struct for function pointers, eg:
```
static const struct clixon_plugin_api api = {
    "example",
    clixon_plugin_init,
    ...
}
clixon_plugin_api *clixon_plugin_init(clicon_handle h)
{
    return (void*)&api;
}
```
  * Moved specific plugin functions from apps/ to generic functions in lib/
    * New generic plugin load function: clixon_plugins_load()
  * Removed client-local netconf plugins netconf_plugin_callbacks()
    * This was code used before generic YANG rpc calls
  * Added username to clixon handle:
    * clicon_username_get() / clicon_username_set()
  * Added authentication plugin callback
  * Removed some obscure plugin code that seem not to be used (please report if needed!)
    * CLI parse hook
    * CLICON_FIND_PLUGIN
    * clicon_valcb()
* Removed username to rpc calls (added below)
2018-04-02 10:38:53 +02:00
Olof hagsand
bfce20c760 * Added Clixon Restconf library
* Builds and installs a new restconf library: libclixon_restconf.so and clixon_restconf.h
  * The restconf library can be included by a restconf plugin.
  * Example code in example/Makefile.in and example/restconf_lib.c
* Authorization
  * Example extended with authorization
  * Test added with http basic authorization (test/test_auth.sh)
  * Documentation in FAQ.md
* README.md extended with new yang, netconf, restconf, datastore, and auth sections.
2018-03-25 15:47:27 +02:00
Olof hagsand
835674bbe0 \r\n in restconf code and tests 2018-03-22 21:33:41 +01:00
Olof hagsand
efa72e9e6f * Proper RFC 6241 Netconf error handling
* New functions added in clixon_netconf_lib.[ch]
  * Datastore code modified for RFC 6241
  * Remaining: validate, generic restconf and netconf code
2018-03-18 18:06:02 +00:00
Olof hagsand
7431757e53 Preparing for 3.5.0 2018-02-12 09:05:27 +07:00
Olof hagsand
6b0e0a9d18 preparations for 3.5.0 2018-02-11 16:46:10 +07:00
Olof hagsand
cefaf4717f Making the tests self-contained wrt config file and lib.sh creating test scratch dir. 2018-01-07 17:56:33 +01:00
Olof hagsand
4b92dbdc10 Optimized search performance for large lists by sorting and binary search 2017-12-27 11:34:47 +01:00
Olof hagsand
96a7ec86f0 Fixed DESTDIR make install/uninstall and break immediately on errors 2017-11-22 22:21:12 +01:00
Olof hagsand
ca7b4d3d9e Migrated to XML configure file. 2017-10-01 12:33:12 +02:00
Olof hagsand
687641e944 Added event_poll function; optimization experiments 2017-09-15 17:24:51 +02:00
Olof hagsand
624b949b3f netconf client was limited to 8K byte messages. Now limit is 2^32 2017-09-13 22:30:35 +02:00
Olof hagsand
265ed859de mem leak 2017-08-01 19:39:19 +02:00
Olof hagsand
5ae1aeb427 Added support for YANG anyxml; Yang union CLI generation and validation; Removed yang string escaping 2017-07-27 11:54:28 +02:00
Olof hagsand
abd3eee17d Generic map_str2int generic mapping tables; Removed vector return values from xmldb_get() 2017-06-21 21:02:09 +02:00
Olof hagsand
0d7351093b rm printfs 2017-06-04 10:29:32 +02:00
Olof hagsand
3453dae0db - removed api_path extension from internal netconf
- Strings in xmldb_put not properly encoded, eg eth/0 became eth.00000
2017-05-30 21:57:06 +02:00
Olof hagsand
d02015f456 datastore text works with replace 2017-04-17 19:47:32 +02:00
Olof hagsand
eec5896797 internal netconf mods 2017-03-25 18:24:52 +01:00
Olof hagsand
2fcefda831 Change internal protocol from clicon_proto.h to netconf. 2017-03-25 11:10:50 +01:00
Olof Hagsand
f5250b136c test 2017-03-06 19:40:39 +01:00
Olof hagsand
6d8acdea9f truncate helptext 2016-03-09 21:01:57 +01:00
Olof hagsand
0a812696c2 xmldb 2016-03-07 20:55:55 +01:00