Dave Cornejo
e2ee6e6757
handle newlines in CDATA properly
2018-06-07 17:56:07 -10:00
Dave Cornejo
8f9a38d2aa
add handling of CDATA to XML parser
2018-06-07 13:26:18 -10: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
0ad6703663
xmlns sanity check
2018-06-05 16:43:43 +02:00
Olof hagsand
849e46191e
* Added xmlns validation
...
* for eg <a xmlns:x="uri"><x:b/></a>
2018-06-05 09:42:11 +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
ea13727e97
* Removed cli callback vector functions. Set COMPAT_COMPAT_CLIV if you need to keep these functions in clixon_custom.h.
...
* Added --enable-debug.
2018-05-30 22:38:12 +02:00
Olof Hagsand
0622f6aafe
xml/xsl test programs
2018-05-27 18:31:19 +00:00
Olof hagsand
b230215eaf
unit test pgm
2018-05-19 00:27:53 +02:00
Olof Hagsand
958c1c0197
Merge branch 'develop' of https://github.com/clicon/clixon into develop
2018-05-18 22:17:40 +00:00
Olof Hagsand
a14c8c9778
unit test
2018-05-18 22:17:09 +00:00
Olof Hagsand
353f2e6038
added merge of json trees
2018-05-15 22:24:44 +02:00
Olof Hagsand
20a677cb6c
code cleanup and doc
2018-05-12 19:00:46 +02:00
Olof Hagsand
82351afde3
header docs
2018-05-08 21:53:46 +02:00
Olof hagsand
4257999df5
Fixed JSON unbalanced braces resultin assert
2018-05-06 21:06: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
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
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
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
24de61f14a
Ignore \r - common http/restconf end-of-line
2018-04-09 04:24:22 +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
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
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
cce76faa79
Fixed three-key list entry problem (reported by jdl@netgate)
2018-03-24 14:37:36 +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
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
Olof Hagsand
ac7480b9f5
* Invalid key to api_path2xml gives warning instead of error and quit.
2018-03-05 20:00:10 +00: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
e9b61d4ed7
Merge branch 'develop' of https://github.com/clicon/clixon into develop
2018-02-25 20:02:55 +01:00
Olof hagsand
35b142cf4d
* Added Yang "extension" statement. This includes parsing unknown
...
statements and identifying them as extensions or not. However,
semantics for specific extensions must still be added.
* Renamed ytype_id and ytype_prefix to yarg_id and yarg_prefix, respectively
* Added cli_show_version()
2018-02-25 20:01:53 +01:00
Olof Hagsand
1e88c38877
translate xml->json \n correctly
2018-02-17 20:51:42 +00: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
eea8cd7660
xml2cvec: range error (eg 1000 for int8) is not treated as error, just log and skip.
2018-02-03 14:56:27 +07:00
Olof hagsand
2bbf0b8a15
xml2json dont put doublequotes on numbers and bool values in json
2018-02-02 16:35:37 +07:00
Olof hagsand
f65187df7f
code cleanup
2018-01-27 14:28:57 +01:00