Commit graph

354 commits

Author SHA1 Message Date
Olof hagsand
4257999df5 Fixed JSON unbalanced braces resultin assert 2018-05-06 21:06:52 +02:00
Olof hagsand
697c021d49 Starting 3.7.0 branch 2018-05-06 20:55:38 +02:00
Olof hagsand
c439c97dbc Merge branch 'master' into develop 2018-05-06 20:53:41 +02:00
Olof hagsand
15ec033f6c 3.6.0 2018-04-30 19:06:37 +02:00
Olof hagsand
2469978ac9 Merge branch 'develop' 2018-04-30 19:02:52 +02:00
Olof Hagsand
5d4abbff38 Merge branch 'develop' of https://github.com/clicon/clixon into develop 2018-04-30 18:57:50 +02:00
Olof hagsand
7532fdde77 * INSTALLFLAGS added with default value -s(strip).
* For debug do: CFLAGS=-g INSTALLFLAGS= ./configure
2018-04-30 12:06:19 +02:00
Olof hagsand
1ac57dedaf Some memleaks and last minute 3.6 release changes. 2018-04-29 18:35:06 +02:00
Olof Hagsand
3df4a8a190 Added keyword arg to find schemanode functions 2018-04-27 19:15:11 +02:00
Olof Hagsand
aa2ada1f5c
Merge pull request #21 from rbgarga/fix_install_lib
Improve permissions and strip binaries (part 2)
2018-04-26 23:10:33 +02:00
Renato Botelho do Couto
680753a5e2 Improve permissions and strip binaries (part 2)
- Use 0755 for directories
- Use 0644 for libraries, includes and shared files
- Use -s (strip) parameter when installing binaries and libraries
2018-04-25 13:56:25 -05:00
Olof hagsand
d57a6cf53c * plugin_start() callbacks added for restconf
* Hard-wired users for authentication example
2018-04-24 17:43:19 +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
d032dbe1cb
Merge pull request #20 from dcornejo/develop
include limits.h for non-Linux compatibility
2018-04-23 21:39:51 +02:00
Olof Hagsand
d624cf7513
Merge pull request #19 from rbgarga/improve_makefile
Improve permissions and strip binaries
2018-04-23 21:32:54 +02:00
Dave Cornejo
513df9b19d include limits.h for non-Linux compatibility 2018-04-23 08:49:45 -10:00
Renato Botelho do Couto
dabf0e5918 Improve permissions and strip binaries
- Use 0755 for directories
- Use 0644 for libraries, includes and shared files
- Use -s (strip) parameter when installing binaries and libraries
2018-04-23 13:33:21 -05:00
Olof hagsand
50522df3d9 Showing syntax using CLI commands was broekn and is fixed. 2018-04-22 21:36:55 +02:00
Olof hagsand
1913407e52 Replacing remaining badrequest() with proper restconf error msg. 2018-04-22 20:13:54 +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
04a3f4db1b Merge branch 'develop' of https://github.com/clicon/clixon into develop 2018-04-15 10:53:12 +01:00
Olof Hagsand
b2abab71f0 local restconf rpc callback sent error and then main restconf handler sent ok. Callback should just return xml buffer, not do actual restconf callback 2018-04-15 10:52:52 +01:00
Olof hagsand
ea792a7850 CHANGELOG typos 2018-04-09 06:27:15 +02:00
Olof Hagsand
24de61f14a Ignore \r - common http/restconf end-of-line 2018-04-09 04:24:22 +00:00
Olof Hagsand
a2e9a05902 mv api_return_err to restconf_lib.c 2018-04-08 16:07:24 +00:00
Olof Hagsand
0907574acf renamed plugin_find/each to clixon_plugin_find/each 2018-04-08 14:10:06 +00:00
Olof hagsand
2e00411621 CLI plugin API restructuring completed. Now all plugin APIs have the generic form
documented in README and FAQ.
2018-04-08 11:32:43 +02:00
Olof hagsand
afb6aa31db Cleaned up apps/* Makefile.in:s 2018-04-07 19:04:56 +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
7a4371e76f debug function 2018-04-07 08:09:55 +00:00
Olof Hagsand
843b6abbcb plugin API remake 2018-04-04 09:51:47 +00:00
Olof hagsand
b9a54f07f3 Restructure and more generic plugin API for backend 2018-04-02 19:27:57 +02:00
Olof hagsand
7fbd95d491 Updated ietf-netconf-acm to ietf-netconf-acm@2018-02-14.yang from RFC 8341 2018-04-02 13:33:24 +02:00
Olof hagsand
6ed769e082 The Clixon example has changed name from routing to example affecting all config files, plugins, tests, etc. 2018-04-02 13:18:47 +02:00
Olof hagsand
0e52e86c0f CHANGELOG formatting 2018-04-02 11:15:24 +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
b8e35742b9 README update 2018-03-25 16:04:30 +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
cce76faa79 Fixed three-key list entry problem (reported by jdl@netgate) 2018-03-24 14:37:36 +01:00
Olof hagsand
835674bbe0 \r\n in restconf code and tests 2018-03-22 21:33:41 +01:00
Olof hagsand
ba3ca7e07f added clixon_netconf_lib.h 2018-03-20 18:39:24 +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
52e510cfdf The key-value datastore is no longer supported. Use the default text datastore. 2018-03-18 16:57:18 +00:00
Olof hagsand
9b951b5ce6 restconf json err return: too many {} 2018-03-13 23:17:36 +00:00
Olof hagsand
03be9c0567 Restconf error handling 2018-03-11 22:49:10 +01:00
Olof hagsand
96a3b586b8 Restconf error handling 2018-03-11 20:25:31 +01:00
Olof hagsand
859d424ea3 (Work in progress) Restconf error handling for get and edit operations 2018-03-11 20:17:11 +01:00
Olof hagsand
0a11445963 cprintf sanity checks 2018-03-10 12:35:11 +01:00