Commit graph

258 commits

Author SHA1 Message Date
Olof hagsand
07542269ec Event stream discovery support
Added config options CLICON_MODULE_LIBRARY_RFC7895, CLICON_STREAM_DISCOVERY_RFC5277, LICON_STREAM_DISCOVERY_RFC804
2018-09-23 17:45:22 +02:00
Olof hagsand
74fc0800ae * Limited support of RFC 7895 YANG Module Library to list modules:
* That is, limited support of: ietf-yang-library.yang
  * For example: `<module><name>example</name><revision/></module><module><name>ietf-restconf-monitoring</name><revision>2017-01-26</revision></module>...`
* Comply to RFC 8040 3.5.3.1 rule: api-identifier = [module-name ":"] identifier
  * The "module-name" was a no-op before.
  * This means that there was no difference between eg: GET /restconf/data/ietf-yang-library:modules-state and GET /restconf/data/XXXX:modules-state
2018-09-22 16:30:58 +02:00
Olof hagsand
0631be19cb * Notification event streams enhancements
* Yang 1.1 notification support
  * Event stream discovery support according to RFC 5277 Sec 3.2.5.1 (netconf) and RFC 8040 (restconf)
2018-09-18 22:49:29 +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
deb89600ed memleaks 2018-07-20 23:16:26 +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
5e587b3a01 Validation of yang bits type space-separated list value 2018-06-10 10:41:06 +02:00
Olof hagsand
5cabc11bfb * Added -U <user> command line to clixon_cli and clixon_netconf for NACM pseudo-user tests 2018-06-07 21:34:52 +02:00
Olof Hagsand
20a677cb6c code cleanup and doc 2018-05-12 19:00:46 +02:00
Olof hagsand
602f5034b4 NACM external file support. CLICON_NACM_FILE config option, if CLICON_NACM_MODE is external 2018-04-23 23:09:55 +02:00
Olof hagsand
3ed1c98556 * Fixed issue https://github.com/clicon/clixon/issues/18 RPC response issues reported by Stephen Jones at Netgate 2018-04-22 16:53:12 +02:00
Olof hagsand
67c0abead7 Fixed issue https://github.com/clicon/clixon/issues/17 special character in strings can break RPCs 2018-04-21 16:32:46 +02:00
Olof hagsand
7650803475 * Experimental NACM RFC8341 Network Configuration Access Control Model.
* CLICON_NACM_MODE config option, default is disabled.
  * Added username attribute to all rpc:s from frontend to backend
  * Added NACM backend module in example
2018-04-19 22:44:15 +02:00
Olof hagsand
d541c49c6f Plugin RPC callback interface have been unified between backend, netconf and restconf.
* Backend RPC register callback function (Netconf RPC or restconf operation POST) has been changed from: `backend_rpc_cb_register()` to `rpc_callback_register()`
    * Backend RPC callback signature has been changed from: `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)` has been changed to : `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)`
    * Frontend netconf and restconf plugins can register callbacks as well with same API as backends.
2018-04-07 18:20:33 +02:00
Olof hagsand
b9a54f07f3 Restructure and more generic plugin API for backend 2018-04-02 19:27:57 +02: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
55010e7541 restconf credentials plugin 2018-02-09 12:18:39 +07:00
Olof hagsand
38f0b446fa 2017->2018 2018-01-01 12:25:33 +01:00
Olof hagsand
19301ae240 sort xml children on parsing 2017-12-31 18:25:53 +01:00
Olof hagsand
013a0dba14 editt changelog 2017-11-19 19:11:34 +01:00
Olof hagsand
61551b07d6 When user callbacks p_statedata() clixon_backend nolonger silently exit 2017-11-14 23:14:51 +01:00
Olof Hagsand
3c41a79102 hen user callbacks such as statedata() call returns -1, clixon_backend no
longer silently exits. Instead a log is printed and an RPC error is returned.
2017-11-12 15:50:22 +00:00
Olof hagsand
d9c126eed0 en user callbacks such as statedata() call returns -1, clixon_backend no
longer silently exits. Instead a log is printed and an RPC error is returned.
2017-11-12 16:48:48 +01:00
Olof Hagsand
178a09cf3b Removed unused functions: cli_exec, cli_ptpush, cli_ptpop 2017-10-21 19:15:24 +02:00
Olof hagsand
ed8f145968 use-before-assign 2017-07-28 20:53:46 +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
2d65fdbe93 Changed top-level netconf get-config and get to return <data>..</data> instead of <data><config>...</config></data> to comply to the RFC. 2017-07-23 14:45:33 +02:00
Olof hagsand
e5b625e722 Added support for yang presence and no-presence containers. 2017-07-23 12:59:02 +02:00
Olof hagsand
4e986d6660 Added new backend plugin callback: plugin_statedata() for getting state data; Added generic xml_merge() function. 2017-07-05 12:30:42 +02:00
Olof hagsand
f5c19d8586 Added state data 2017-07-01 17:42:39 +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
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
a18f66b6d0 Preparing for 3.3.0 2017-05-07 17:38:43 +02:00
Olof Hagsand
9c4ac8678d Merge branch 'develop' of https://github.com/clicon/clixon into develop 2017-05-07 16:15:11 +02:00
Olof Hagsand
24578767e7 sigpipe problems 2017-05-07 16:14:49 +02:00
Olof hagsand
4bcb966dac xmldb_init -> xmldb_create 2017-05-02 22:29:56 +02:00
Olof hagsand
69ff0e3891 Refined netconf none semantics in tests and text datastore 2017-05-01 12:46:09 +02:00
Olof hagsand
ee9b74d735 formalizing xmldb api 2017-04-16 19:06:19 +02:00
Olof hagsand
236b661e43 cleaned up string functions 2017-04-04 17:11:21 +02:00
Olof Hagsand
18093441a8 revert xsl for . and .. 2017-04-03 15:21:13 +02:00
Olof hagsand
19813a4d9c restconf post/put/head/patch, memtests 2017-03-26 15:14:37 +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
7f0b9909b3 Library functions in clixon_cli_api.h (e.g cli_commit) is rewritten in new
for (eg cli_commitv). See clixon_cli_api.h for new names.
Use restconf format for internal xmldb keys. Eg /a/b=3,4
Changed example to use multiple cli callbacks
2017-01-31 22:36:14 +01:00
Olof hagsand
bc2b606167 dual license 2016-12-30 16:14:48 +01:00
Olof hagsand
b744a4ad8a restconf; xmlput extended with api_path; xmldb_put_tree 2016-09-20 21:51:08 +02:00
Olof Hagsand
20087932c5 xml rm self, debug backend, xml2json to cbuf 2016-08-07 15:42:14 +02:00
Olof Hagsand
8bf95cab31 log debug 2016-07-18 16:14:16 +02:00
Olof Hagsand
eaaf1b83e8 notify filter 2016-05-22 17:37:28 +02:00