Commit graph

90 commits

Author SHA1 Message Date
Olof hagsand
89fddd4cca variables in docker start 2020-08-18 17:26:39 +02:00
Olof hagsand
e1d86ca3b5 Clixon 4.6 2020-08-14 10:47:37 +02:00
Olof hagsand
25245a12d2 code documentation 2020-07-12 10:59:12 +02:00
Olof hagsand
1a1aa58249 CLIgen pt_expand API change and mem problems 2020-05-20 12:00:52 +02:00
Olof hagsand
48dfc1201f Bumped version to 4.6.0.PRE 2020-05-14 14:14:14 +02:00
Olof hagsand
0e94937ccf Sanity check of mandatory key statement for Yang LISTs.
* If fails, exit with error message, eg: `Yang error: Sanity check failed: LIST vsDataContainer lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)`
  * Can be disabled by setting `CLICON_CLICON_YANG_LIST_CHECK` to `false`
2020-03-09 15:48:33 +01:00
Olof hagsand
0f54899ae4 * Added option: CLICON_CLI_BUF_START and CLICON_CLI_BUF_THRESHOLD so you can change the start and
threshold of quadratic and linear growth of CLIgen buffers (cbuf:s)
* Memory footprint
  * Do not autopopulate namespace cache, instead use on-demand, see `xml2ns()`.
  * Set CBUF start level to 256 (`CLICON_CLI_BUF_START` option)
  * Reduced xml child vector default size from 4 to 1 with quadratic growoth to 64K then linear
2020-03-04 11:27:43 +01:00
Olof hagsand
250ead517c CHanged back xvec API to use cxobj ** instead if clixon_xvec since it may be easier for the an end-user. 2020-03-02 10:59:46 +01:00
Olof hagsand
de3853a126 readnme buttons 2020-02-23 17:17:28 +01:00
Olof hagsand
e16ef2daff Logo 2020-02-23 17:12:59 +01:00
Olof hagsand
3806f7652e Hello netconf candidate capability misspelled, mentioned in [Can clixon_netconf receive netconf packets as a server? #93](https://github.com/clicon/clixon/issues/93) 2019-09-04 14:56:17 +02:00
Olof hagsand
6bcaea259c documentation 2019-09-01 19:45:54 +02:00
Olof hagsand
a8906fd0bd 4.1.0 docs 2019-08-18 16:22:46 +02:00
Olof hagsand
ee329ee382 * RESTCONF "depth" query parameter supported
* C API change: Added `depth` parameter to function `clicon_xml2cbuf`, default is -1.
2019-08-17 10:54:13 +02:00
Olof hagsand
48022e57b9 fixed CHANGELOG, restconf memleak, with-defaults test 2019-08-09 17:35:45 +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
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
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
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
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
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
73d8e97a01 added template doc/INSTALL.md 2019-06-18 10:07:17 +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
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
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
c529847790 * Yang "min-element" and "max-element" feature supported
* New Clixon Yang RPC: ping. To check if backup is running.
* Fixed support for multiple datanodes in a choice/case statement.
2019-05-07 11:47:30 +02:00
Olof hagsand
2fc37d2470 Yang "unique" feature supported according to RFC 7950 7.8.3 2019-05-03 14:03:10 +02:00
Olof hagsand
6bf2a74e24 * Restconf with startup feature will now copy all edit changes to startup db (as it should according to RFC 8040)
* See [Restconf does not handle startup datastore according to the RFC](https://github.com/clicon/clixon/issues/74)
* Netconf Startup feature is no longer hardcoded, you need to explicitly enable it (See RFC 6241, Section 8.7)
  * Enable in config file with: `<CLICON_FEATURE>ietf-netconf:startup</CLICON_FEATURE>`, or use `*:*`
2019-04-26 12:12:55 +02:00
Olof hagsand
c3d9b392dd Scaling large lists report 2019-04-17 15:50:38 +02:00
Olof hagsand
d46ca41c8b Further optimizions and bugfixing of that 2019-04-16 12:09:21 +02:00
Olof hagsand
3f68cca06c * New yang changelog experimental feature for automatic upgrade
* Added modules-state diff parameter to xmldb_get datastore function for startup scenarios.
* Allowed Yang extended Xpath functions (syntax only):
  * re-match, deref, derived-from, derived-from-or-self, enum-value, bit-is-set
* XSD regular expression handling of dash(`-`)
  *: Translate XDS `[xxx\-yyy]` to POSIX `[xxxyyy-]`.
* YANG Anydata treated same as Anyxml
2019-03-21 18:05:55 +01:00
Olof hagsand
b54e6c1cc0 example regression fail
FAQ table-of-content
2019-03-10 18:33:17 +01:00
Olof hagsand
01c8b0b836 * [Identityref inside augment statement](https://github.com/clicon/clixon/issues/77)
* Yang-stmt enhanced with "shortcut" to original module
2019-03-05 22:42:13 +01:00
Olof Hagsand
7590395fe3 Starting 3.10 release cycle
Moved docs to doc/
2019-02-22 14:45:37 +01:00
Olof hagsand
701ef1dead 3.9.0 2019-02-21 20:04:04 +01:00
Olof hagsand
9afdd66f9a Preparing for 3.9.0 2019-02-21 16:12:37 +01:00
Olof hagsand
7e4cce0000 test docs 2019-02-19 13:32:03 +01:00
Olof hagsand
9fc8ac2e8e README changes 2019-02-13 15:32:39 +01:00
Olof hagsand
54626aaae4 Documented Clixon CLIgen usage and extensions 2019-02-13 15:20:42 +01:00
Olof Hagsand
9b73d604f5 travis make test 2019-02-11 16:46:28 +01:00
Olof Hagsand
dc173e0b4c docker base and system images, and trigger docker test from travis. 2019-02-11 15:47:12 +01:00
Olof hagsand
d0182e98ca Travis test scripts 2019-02-04 16:44:15 +01:00
Olof hagsand
1e4022e73c NACM cleanup, uniform rule function, change of function names, etc. 2019-02-02 11:35:50 +01:00
Olof hagsand
0267afcb21 * Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
* Added -p <dir> command-line option to all programs: backend, cli, netconf, restconf.
* Moved and updated all standard ietf and iana yang files from example and yang/ to `yang/standard`.
* Renamed example yang from example.yang -> clixon-example.yang
2019-01-13 17:34:15 +01:00
Olof hagsand
c7e847cd24 Keyword "min" (not only "max") can be used in built-in types "range" and "length" statements. 2019-01-06 22:11:59 +01:00
Olof hagsand
0baebc93fd * Strict namespace setting can be a problem when upgrading existing database files, such as startup-db or persistent running-db, or any other saved XML file.
* For backward compatibility, load of startup and running set CLICON_XML_NS_STRICT to false temporarily.
* Added three-valued return values for several validate functions where -1 is fatal error, 0 is validation failed and 1 is validation OK.
  * This includes: `xmldb_put`, `xml_yang_validate_all`, `xml_yang_validate_add`, `xml_yang_validate_rpc`, `api_path2xml`, `api_path2xpath`
* Added new xml functions for specific types: `xml_child_nr_notype`, `xml_child_nr_notype`, `xml_child_i_type`, `xml_find_type`.
2019-01-02 15:18:29 +01:00