Olof hagsand
f2810e849f
Fork fcgi handler for streams
2018-11-04 14:46:15 +01: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
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
719ea93398
Conformance to RFC-8040 operations where prefix was used instead of module name.
...
* Proper specification for an operation is POST /restconf/operations/<module_name>:<rpc_procedure> HTTP/1.1
* See https://github.com/clicon/clixon/issues/31 , https://github.com/clicon/clixon/pull/32 and https://github.com/clicon/clixon/issues/30
* Thanks David Cornejo and Dmitry Vakhrushev of Netgate for pointing this out
2018-07-13 16:31:39 +02:00
Olof hagsand
60ce7b12bd
* Prefix of rpc was ignored
...
* https://github.com/clicon/clixon/issues/30
2018-06-20 20:53:34 +02:00
Olof Hagsand
a0d4569488
64-bit vars
2018-06-17 17:58:59 +00: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
5d4abbff38
Merge branch 'develop' of https://github.com/clicon/clixon into develop
2018-04-30 18:57:50 +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
Dave Cornejo
513df9b19d
include limits.h for non-Linux compatibility
2018-04-23 08:49:45 -10: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
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