Olof hagsand
10a2dbe8ec
* Added experimental binary search API function: xml_binsearch
...
* Added content parameter to `clicon_rpc_get` (-1 or CONTENT_ALL is default)
* Reverted change in clixon-lib.yang
2019-08-14 11:13:24 +02:00
Olof hagsand
8b7b7b0f60
* RESTCONF "content" query parameter supported
...
* New clixon-lib@2019-08-13.yang revision
* Bugfix: If `ietf-netconf.yang` was imported from any yang module, client/backend communication stops working.
2019-08-13 13:21:11 +02:00
Olof hagsand
48022e57b9
fixed CHANGELOG, restconf memleak, with-defaults test
2019-08-09 17:35:45 +02:00
Olof hagsand
e244f5c8f8
Added patch media types; restconf patch test-cases; nsc spelling
2019-08-09 14:49:40 +02:00
Olof hagsand
35808c8352
Restconf PATCH: added accept-patch http header
2019-08-08 14:16:53 +02:00
Olof hagsand
46b6a8008a
RESTCONF PATCH (plain patch) is supported according to RFC 8040 4.6.1
2019-08-08 11:42:45 +02:00
Olof hagsand
aa14f8ac2c
RESTCONF PUT/POST -d {} media is enforced
2019-08-06 15:47:46 +02:00
Olof hagsand
aa653d0831
CLI multi-key bug for ordered-by user
2019-08-04 17:38:13 +02:00
Olof hagsand
df9e4734f9
Bugfix: multiple key cli bug, ambiguous commands in expand_dbvar
2019-08-04 17:07:11 +02:00
Olof hagsand
1fe7d916f4
segv on multiple keys
2019-08-03 15:08:10 +02:00
Olof hagsand
b73348e0cd
* Revised RESTCONF->NETCONF insert/point translation
...
* Netconf edit-config "operation" attribute namespace check is enforced
2019-08-02 17:04:27 +02:00
Olof hagsand
c97346921b
Netconf operation attribute namespace check is enforced
2019-07-31 16:45:48 +02:00
Olof hagsand
2d9d204f69
* RESTCONF "insert" and "point" query parameters supported
...
* Yang Netconf leaf/leaf-list insert support
* For "ordered-by user" leafs and leaf-lists, the insert and value/key attributes are supported according to RFC7950 Sections 7.7.9 and 7.8.6
* Fixed RESTCONF api-path leaf-list selection was not made properly
2019-07-31 14:04:27 +02:00
Olof hagsand
d7a8cf5b0c
json empty type null encoded as [null]
2019-07-29 15:14:24 +02:00
Olof hagsand
3b93c812d4
identity restconf mapping for augment and identity tests
2019-07-29 11:34:14 +02:00
Olof hagsand
70ebfa4d80
* Identity/identityref mapped between XML and JSON
2019-07-28 18:09:55 +02:00
Olof hagsand
ccc95b2826
Merge branch 'master' of https://github.com/clicon/clixon
2019-07-25 13:40:01 +02:00
Olof Hagsand
28f0a503a3
Merge branch 'master' of https://github.com/clicon/clixon
2019-07-25 11:39:33 +00:00
Olof Hagsand
5f7d011654
memleaks
2019-07-25 11:39:17 +00:00
Olof hagsand
c1bae276ff
* RESTCONF PUT/POST erroneously returned 200 OK. Instead restconf now returns:
...
* `201 Created` for created resources
* `204 No Content` for replaced resources.
* See [RESTCONF: HTTP return codes are not according to RFC 8040](https://github.com/clicon/clixon/issues/56 )
* HTTP `Location:` fields added in RESTCONF POST replies
2019-07-25 13:15:31 +02:00
Olof hagsand
291f173505
libm needed in xpath
2019-07-24 09:46:08 +02:00
Olof hagsand
e7b60619da
* Pushed tag to 4.0.1.PRE
...
* Restconf RFC 8040 increased feature compliance
* Cache-Control: no-cache added in HTTP responses (RFC Section 5.5)
* Restconf monitoring capabilities (RFC Section 9.1)
* Added support for Yang extensions
* New plugin callback: ca_extension
* Main backend example includes example code on how to implement a Yang extension in a plugin.
* JSON changes
* Non-pretty-print output removed all extra spaces.
* Example: `{"nacm-example:x": 42}` --> {"nacm-example:x":42}`
* Empty JSON container changed from `null` to `{}`.
* Empty list and leafs remain as `null`
* Removed unnecessary configure dependencies
* libnsl, libcrypt, libm, if_vlan,...
* pseudo-plugin added, to enable callbacks also for main programs. Useful for extensions
* Yang Unique statements with multiple schema identifiers did not work on some platforms due to memory error.
2019-07-23 22:11:14 +02:00
Olof hagsand
fe46a0e093
Clixon release 4.0.0
2019-07-13 16:33:23 +02:00
Olof Hagsand
2a766c5adf
zerocopy memleak
2019-07-13 13:40:14 +00:00
Olof hagsand
8b50695e1f
misleading if indentation
2019-07-11 12:14:02 +02:00
Olof hagsand
6d46087109
Documented bug [Yang identityref XML encoding is not general #90 ]( https://github.com/clicon/clixon/issues/90 )
2019-07-11 12:11:45 +02:00
Olof hagsand
e44685a100
Replaced strchr with nodeid_split
...
Experimental code for replacing identityref lists with module:id instead of prefix:id
2019-07-10 17:18:34 +02:00
Olof hagsand
40d5b99d3b
Reverted some of the nsc xpath API changes. In the revert, xpath_first() and xpath_vec() retain their old syntax with nsc==NULL.
...
The reason is to be conservative with the API. However, less used functions, such as xpath_vec_bool(), xpath_vec_ctx() and xpath_vec_flag() are changed with a new `nsc`parameter, which should be set to NULL in most cases.
2019-07-09 12:19:03 +02:00
Olof Hagsand
89f751357d
Memory error
...
[Netconf get/get-config :xpath capability does not support namespaces](https://github.com/clicon/clixon/issues/75 )
2019-07-08 16:21:27 +00:00
Olof hagsand
1f8c759f3d
Merge branch 'master' of https://github.com/clicon/clixon .
...
Added new API function `xpath_parse()` to split parsing and xml evaluation.
2019-07-08 14:47:18 +02:00
Olof hagsand
67b8685bab
The Clixon API has been extended with namespaces, or namespace contexts in the following cases:
...
* CLIspec functions have added namespace parameter:
* `cli_show_config <db> <format> <xpath>` --> `cli_show_config <db> <format> <xpath> <namespace>`
* `cli_copy_config <db> <xpath> ...` --> `cli_copy_config <db> <xpath> <namespace> ...`
* Xpath API
* `xpath_first(x, format, ...)` --> `xpath_first(x, nsc, format, ...)`
* `xpath_vec(x, format, vec, veclen, ...)` --> `xpath_vec(x, nsc, format, vec, veclen, ...)`
* `xpath_vec_flag(x, format, flags, vec, veclen, ...)` --> `xpath_vec_flag(x, format, flags, vec, veclen, ...)`
* `xpath_vec_bool(x, format, ...)` --> `xpath_vec_bool(x, nsc, format, ...)`
* `xpath_vec_ctx(x, xpath, xp)` --> `xpath_vec_ctx(x, nsc, xpath, xp)`
* xmldb_get0 has an added `nsc` parameter:
* `xmldb_get0(h, db, xpath, copy, xret, msd)` --> `xmldb_get0(h, db, nsc, xpath, copy, xret, msd)`
* The plugin statedata callback (ca_statedata) has been extended with an nsc parameter:
* `int example_statedata(clicon_handle h, cvec *nsc, char *xpath, cxobj *xstate);`
* rpc get and get-config api function has an added namespace argument:
* `clicon_rpc_get_config(clicon_handle h, char *db, char *xpath, char *namespace, cxobj **xt);`
* `int clicon_rpc_get(clicon_handle h, char *xpath, char *namespace, cxobj **xt);`
2019-07-08 10:36:37 +02:00
Olof hagsand
41f7e44dec
Return 404 Not found error if restconf GET does not return requested instance
2019-07-04 20:21:07 +02:00
Olof hagsand
b64dd678dc
CLI ranges error shown instead of "Unknown command"
2019-06-21 17:44:52 +02:00
Olof hagsand
d12644a5ef
Fixed [Wrong yang-generated cli code for typeref identityref combination #88 ]( https://github.com/clicon/clixon/issues/88 )
2019-06-20 19:00:22 +02:00
Olof hagsand
c3245f0600
On validation callbacks, XML_FLAG_ADD is added to all nodes at startup validation, not just the top-level. This is the same behaviour as for steady-state validation.
2019-06-19 21:54:59 +02:00
Olof hagsand
af720e8f28
Merge branch 'master' of https://github.com/clicon/clixon
2019-06-18 14:50:30 +02:00
Olof hagsand
17e3e74ad5
All hash_ functions have been prefixed with clicon_ to avoid name collision with other packages (frr)
2019-06-18 14:49:18 +02:00
Olof hagsand
3bad8bc874
* startup_extraxml triggers unnecessary validation
...
* Renamed startup_db_reset -> xmldb_db_reset (its a general function)
* In startup_extraxml(), check if reset callbacks or extraxml file actually makes and changes to the tmp db.
2019-06-14 22:01:30 +02:00
Olof hagsand
de15b2bf80
* RESTCONF strict namespace validation of data in POST and PUT.
...
* Accepted:
```
curl -X PUT http://localhost/restconf/data/mod:a -d {"mod:a":"x"}
```
* Not accepted (must prefix "a" with module):
```
curl -X PUT http://localhost/restconf/data/mod:a -d {"a":"x"}
```
* Undefine `RESTCONF_NS_DATA_CHECK` in include/clixon_custom.h to disable strict check.
2019-06-10 16:15:02 +02:00
Olof hagsand
fc78824110
Many validation functions have changed error parameter from cbuf to xml tree.
2019-06-10 12:49:40 +02:00
Olof hagsand
dfa3970ab2
RESTCONF PUT list key problems
2019-06-08 16:32:56 +02:00
Olof hagsand
97079b0a88
Fixed side-effect of RESTCONF PUT key-match patch
2019-06-08 10:17:56 +02:00
Olof hagsand
d3c392b69d
* New clixon-config@2019-06-05.yang revision
...
* Added: `CLICON_YANG_REGEXP, CLICON_CLI_TAB_MODE, CLICON_CLI_HIST_FILE, CLICON_CLI_HIST_SIZE, CLICON_XML_CHANGELOG, CLICON_XML_CHANGELOG_FILE`.
* Renamed: `CLICON_XMLDB_CACHE` to `CLICON_DATASTORE_CACHE` and type changed.
* Deleted: `CLICON_XMLDB_PLUGIN, CLICON_USE_STARTUP_CONFIG`;
* New clixon-lib@2019-06-05.yang revision
* Added: ping rpc added (for liveness)
* Check cligen tab mode, dont start if CLICON_CLI_TAB_MODE is undefined
2019-06-05 10:58:02 +02:00
Olof hagsand
3dba0b5370
Restore xmldb_get() to original (but removed one parameter
...
Moved all zero-copy xmldb_get functions to xmldb_get0.
Clarified CHANGELOG for xmldb_get changes
2019-06-04 11:14:03 +02:00
Olof hagsand
2aeb925521
* JSON parse and print improvements
...
* Integrated parsing with namespace translation and yang spec lookup
2019-06-03 16:40:54 +02:00
Olof hagsand
55f9b7cab0
Added CLIgen tab-modes in config option CLICON_CLI_TAB_MODE, which means you can control the behaviour of <tab> in the CLI.
2019-05-29 20:11:31 +02:00
Olof Hagsand
2ae9529a3e
added regexp free routines, replaced regexp mode string with symbol
2019-05-29 14:17:30 +00:00
Olof hagsand
5706703ab4
Added support for inverted regexps
2019-05-29 14:39:36 +02:00
Olof hagsand
2fe185d683
* Support for multiple patterns as described in RFC7950 Section 9.4.7
...
* Added regex cache to type resolution
* Added compiled regexp parameter as part of internal yang type resolution functions
* All internal `ys_populate_*()` functions (except ys_populate()) have switched parameters: `clicon_handle, yang_stmt *)`
2019-05-29 11:39:09 +02:00
Olof hagsand
5b39b63698
Added --with-libxml2 to configure
2019-05-24 10:04:29 +02:00