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
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
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
c9ea6d99cf
zero-copy mem error; preparing for 4.0
2019-07-12 17:00:46 +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
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
a2340c265c
test scripts: replaced sleeps with wait functions
2019-07-01 10:32:48 +02:00
Olof hagsand
1134b084c3
error range test error x - y
2019-06-30 15:14:51 +02:00
Olof hagsand
91d01f8c28
range test
2019-06-25 16:55:32 +02:00
Olof hagsand
6dec522af1
Changed invalid number ranges outside type scope.
2019-06-25 16:40:04 +02:00
Olof hagsand
4cd63f6b55
dded enable/disable as alternative boolean truth values on input (in CLIgen)
2019-06-22 12:22:41 +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
fe35e181fd
identityref errmsg memory error
2019-06-20 15:56:02 +02:00
Olof hagsand
d703c274b6
test string problem
2019-06-20 15:43:11 +02:00
Olof hagsand
c90aa8371c
* Fixed [identityref validation fails when using typedef #87 ]( https://github.com/clicon/clixon/issues/87 )
2019-06-20 15:35:57 +02:00
Olof hagsand
97529a20a4
* Error messages for invalid number ranges and string lengths have been uniformed and changed.
...
* Error messages for invalid ranges are now on the form:
```
Number 23 out of range: 1-10
String length 23 out of range: 1-10
```
2019-06-20 13:59:55 +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
daa01b3a5e
Print CLICON_YANG_DIR and CLICON_FEATURE lists on startup with debug flag
2019-06-13 10:36:37 +02:00
Olof hagsand
98cc62eace
Fixed a problem with some netconf error messages caused restconf daemon to exit due to no XML encoding
2019-06-12 18:15:44 +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
40f3d48f2b
Restconf uri with mismatching keys problem
2019-06-10 13:56:06 +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
519fac186c
Extended util/clixon_util_xml with yang and validate functionality so it can be used as a stand-alone utility for validating XML/JSON files
2019-06-07 10:16:03 +02:00
Olof Hagsand
42a974bf78
mem problem in refine/augment code
2019-06-05 09:54:13 +00:00
Olof hagsand
dc45600074
Yang 'refine' feature supported, According to RFC 7950 7.13.2
2019-06-05 10:23:49 +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
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
Olof hagsand
a804e05375
* Added clicon_handle as parameter to all validate functions
...
* Added libxml2 XSD regexp mode as alternative to posix translation
* Added `CLICON_YANG_REGEXP` option with possible values libxml2 and posix
2019-05-23 22:48:33 +02:00
Olof hagsand
f7771d86c2
* Better compliance with XSD regexps (when transforming to Posix regexps)
...
* Added `\p{L}` and `\p{N}`
* Added escaping of `$`
* Added regexp [test/test_pattern.sh]
2019-05-22 20:21:48 +02:00
Olof hagsand
bc54f2d04c
* Regexp improvements
...
* Added check for libxml in configure';
* Added clixon_util_regexp utility function
* Yang state get improvements
* Integrated state and config into same tree on retrieval, not separate trees
* Added cli functions `cli_show_config_state()` and `cli_show_auto_state()` for showing combined config and state info.
* Added integrated state in the main example: `interface/oper-state`.
* Added performance tests for getting state, see [test/test_perf_state.sh].
2019-05-20 16:03:29 +02:00
Olof hagsand
47889a9b0a
Check restconf PUT different keys for leaf-list
2019-05-15 18:35:28 +02:00
Olof hagsand
712d8a6ff1
Restconf PUT different keys detected (thanks @dcornejo) and fixed
2019-05-15 17:38:52 +02:00
Olof hagsand
b4f860b5ef
Merge branch 'master' of https://github.com/clicon/clixon
2019-05-15 11:16:43 +02:00
Olof hagsand
6f294fe67a
Yang Enumeration including space did not generate working CLIgen code, see [Choice with space is not working in CLIgen code]( https://github.com/olofhagsand/cligen/issues/24 )
2019-05-15 11:12:23 +02:00
Olof hagsand
0b0fef12cc
Merge branch 'master' of https://github.com/clicon/clixon
2019-05-14 14:11:43 +02:00
Olof hagsand
d775eb5374
* Improved submodule implementation, as part of [Yang submodule import prefix restrictions #60 ]( https://github.com/clicon/clixon/issues/60 ).
2019-05-14 14:09:02 +02:00
Olof hagsand
e68a5ffa97
cli history file long string test
2019-05-10 16:49:00 +02:00
Olof hagsand
b103599a1a
* Clixon transaction mechanism has changed which may affect your backend plugin callbacks:
...
* Validate-only transactions are terminated by an `end` or `abort` callback.
* If a commit user callback fails, a new `revert` callback will be made to plugins that have made a succesful commit.
2019-05-10 14:45:23 +02:00
Olof hagsand
70221742f7
Merge branch 'master' of https://github.com/clicon/clixon
2019-05-08 13:05:51 +02:00
Olof hagsand
06e6ef80d1
Non-key list now not accepted in edit-config (before only on validation)
2019-05-08 12:51:10 +02:00