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
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
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
a2e9a05902
mv api_return_err to restconf_lib.c
2018-04-08 16:07:24 +00: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
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
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
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
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
859d424ea3
(Work in progress) Restconf error handling for get and edit operations
2018-03-11 20:17:11 +01:00
Olof hagsand
990700b68d
https://github.com/clicon/clixon/issues/16
...
Added restconf/operations get, see RFC8040 Sec 3.3.2:
2018-03-04 21:24:38 +01:00
Olof hagsand
278f3de840
Adding username to all restconf backend calls
2018-02-13 09:17:32 +07:00
Olof hagsand
7431757e53
Preparing for 3.5.0
2018-02-12 09:05:27 +07:00
Olof hagsand
55010e7541
restconf credentials plugin
2018-02-09 12:18:39 +07:00
Olof hagsand
e40d785d5c
* Added a "user" parameter to plugin_credentials() restconf callback.
...
To enable authentication and in preparation for access control a la RFC 6536.
* yang string length "max" keyword set to MAXPATHLEN
2018-02-08 15:24:05 +07:00
Olof hagsand
6c7554de25
RESTCONF -Candidate Roll Back #
2018-01-23 22:09:15 +01:00
Olof hagsand
26667b2c2f
Restconf: get well-known, top-level resource, yang library version, put whole datastore,
...
check for different keys in put lists.
2018-01-21 14:31:53 +01:00
Olof hagsand
f6284ac933
restconf PUT delta
2018-01-17 22:59:54 +01:00
Olof hagsand
cd33380368
Fixed empty restconf data segv; error restconf quit; etc
2018-01-16 22:25:55 +01:00
Olof hagsand
e3fd1f2873
syntax error
2018-01-15 22:49:44 +01:00
Olof Hagsand
73074bf7a8
json vector
2018-01-15 21:36:42 +00:00
Olof hagsand
363bd5d19d
New configuration option: CLICON_RESTCONF_PRETTY
...
Changed RESTCONF GET to return object referenced. ie, GET /restconf/data/X returns X.
2018-01-07 18:01:42 +01:00
Olof hagsand
38f0b446fa
2017->2018
2018-01-01 12:25:33 +01:00
Olof Hagsand
4742fde1e9
XML creation and parse API changes
2017-12-09 14:14:40 +01:00
Olof hagsand
e169485985
Datastore cache introduced; Added yang to XML API
2017-12-02 14:49:49 +01:00
Olof hagsand
8b6bb6ff50
restconf bugs and increased restconf testing
2017-11-19 12:40:32 +01:00
Olof Hagsand
145f6acd2e
More than one restconf input arg
2017-10-29 17:03:09 +01:00
Olof Hagsand
e8a8d6e871
Restconf: http cookie sent as attribute in rpc restconf_post operations to backend.
2017-10-25 21:09:04 +02:00
Olof Hagsand
178a09cf3b
Removed unused functions: cli_exec, cli_ptpush, cli_ptpop
2017-10-21 19:15:24 +02:00
Olof Hagsand
2d9e4666eb
restconf dbg
2017-10-08 19:44:00 +02:00
Olof hagsand
5cea5fa768
xml config default; api_path_fmt2api_path cleanup
2017-10-03 22:41:12 +02:00
Olof hagsand
265ed859de
mem leak
2017-08-01 19:39:19 +02:00
Olof hagsand
fd91bb2933
restconf RPC
2017-07-30 16:16:10 +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
43c39160a5
Restricted yang (sub)module file match to match RFC6020 exactly
2017-06-25 17:48:21 +02:00
Olof hagsand
3bd6c1bf32
yang type resolution fix
2017-06-24 21:40:05 +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
e06ac2e3d2
rest memleak
2017-06-07 20:23:38 +02:00
Olof Hagsand
07fe90b4c4
warnings and asserts
2017-06-05 13:26:47 +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
69ff0e3891
Refined netconf none semantics in tests and text datastore
2017-05-01 12:46:09 +02:00
Olof hagsand
d02015f456
datastore text works with replace
2017-04-17 19:47:32 +02:00
Olof hagsand
ee9b74d735
formalizing xmldb api
2017-04-16 19:06:19 +02:00
Olof hagsand
f6b3e95100
Created xmldb plugin api
2017-04-09 22:53:48 +02:00
Olof hagsand
31c45e5c62
removed cli single callback arg code
2017-04-06 10:26:10 +02:00
Olof hagsand
25d535703e
testing
2017-03-28 21:01:57 +02:00
Olof hagsand
19813a4d9c
restconf post/put/head/patch, memtests
2017-03-26 15:14:37 +02:00