Commit graph

123 commits

Author SHA1 Message Date
Olof hagsand
ee29452d24 * New clixon-config@2020-06-17.yang revision
* Added CLICON_CLI_LINES_DEFAULT for setting window row size of raw terminals
  * Added  enum HIDE to CLICON_CLI_GENMODEL for auto-cli
2020-06-18 11:28:47 +02:00
Olof hagsand
5120409a56 Auto-cli updates and sync with clixon-docs 2020-06-15 16:07:04 +02:00
Olof hagsand
94cf4a88b3 * Optimizations
* Reduced memory for attribute and body objects, see `XML_NEW_DIFFERENTIATE` compile-time option.
  * Optimized cbuf handling in parsing and xml2cbuf functions.
  * Optimized xml scanner to read strings rather than single chars
  * Optimized xml_merge for the case of disjunct trees.
2020-04-28 22:31:58 +02:00
Olof hagsand
e6178858f0 In the bbuild system, you dont need to do make install-include for installing include files for compiling. This is now included in the actions done by make install. 2020-04-05 12:25:33 +02:00
Olof hagsand
d36ab2e093 merge 2020-03-16 15:27:59 +01: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
e8ae628d06 4.3.0 commit 2020-01-01 12:16:32 +01:00
Olof hagsand
0d22a8b6d0 Yang files reorganized into three classes: clixon, mandatory, optional 2019-11-26 21:51:28 +01:00
Olof hagsand
728fe9c6ac * Bumped version to 4.3.0.PRE
* Added wildcard `*` as a mode to `CLICON_MODE` in clispec files
* [Add missing includes](https://github.com/clicon/clixon/pulls)
2019-11-03 13:05:50 +01:00
User Olof
8c18f2a86d Configure and test modification for better Freebsd port 2019-09-20 06:09:48 -10:00
Olof hagsand
27fd99e7cd * Implemented backend daemon drop privileges after initialization to
run as non-privileged user
2019-09-14 18:34:32 +02:00
Olof hagsand
3d5abb77f9 * Backend daemon drops privileges after initialization (to not run as root)
* New config option `CLICON_USER` with default value `clicon`
  * Can also be set with `-U <user>` clixon_backend command-line option
2019-09-11 21:24:14 +02:00
Olof hagsand
6bcaea259c documentation 2019-09-01 19:45:54 +02:00
Olof hagsand
6df434093e * Restconf top-level operations GET root resource modified to comply with
RFC 8040 Sec 3.1
  * non-pretty print remove all spaces, eg `{"operations":{"clixon-example:client-rpc":[null]`
  * Replaced JSON `null` with `[null]` as proper empty JSON leaf/leaf-list encoding.
* [Cannot write to config using restconf example #91](https://github.com/clicon/clixon/issues/91)
  * Updated restconf documentation (the example was wrong)
* [clixon-lib yang revision file name update #92](https://github.com/clicon/clixon/issues/92)
  * Clixon-lib yang file had conflicting filename and internal yang revision.
  * This was only detected in the use-case when a whole dir was loaded.
  * Inserted sanity check in all yang parse routines.
  * Committed updated clixon-lib yang file that triggered the error
2019-08-24 15:30:43 +02:00
Olof hagsand
d9cf43bd46 Preparing for 4.1.0 2019-08-17 17:25:20 +02:00
Olof hagsand
aa14f8ac2c RESTCONF PUT/POST -d {} media is enforced 2019-08-06 15:47:46 +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
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
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
Dave Cornejo
9ad343d6b4 add instructions for FreeBSD 2019-06-18 22:15:38 -10:00
Olof hagsand
73d8e97a01 added template doc/INSTALL.md 2019-06-18 10:07:17 +02:00
Olof hagsand
ee863e5dbd YANG_INSTALLDIR fixes 2019-06-05 17:53:08 +02:00
Olof hagsand
5706703ab4 Added support for inverted regexps 2019-05-29 14:39:36 +02:00
Olof hagsand
77ee046f2e faq 2019-05-24 10:42:05 +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
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
77ad42f1ce startup measurements: test, plot and report 2019-04-23 11:57:18 +02:00
Olof hagsand
6a0628141a More performance tweaks 2019-04-21 17:29:11 +02:00
Olof hagsand
6c2e880ab9 Scaling doc update 2019-04-17 17:53:40 +02:00
Olof hagsand
c4a8f98512 scaling doc update 2019-04-17 17:41:51 +02:00
Olof hagsand
c3d9b392dd Scaling large lists report 2019-04-17 15:50:38 +02:00
Olof hagsand
14d319dd9b * A new "hello world" example is added
* The directory `docker/system` has been moved to `docker/main`
2019-04-17 11:26:05 +02:00
Olof hagsand
d46ca41c8b Further optimizions and bugfixing of that 2019-04-16 12:09:21 +02:00
Olof hagsand
e29cd7cfb9 * Optimized validation by making xml_diff work on raw cache tree (not copies)
* xmldb_get() removed unnecessary config option
2019-04-07 15:55:53 +02:00
Olof hagsand
a269e26c0d Directory change: Moved example to example/main to make room for other examples 2019-03-28 17:58:47 +01:00
Olof hagsand
b10c3c5727 more upgrade-interfaces test cases 2019-03-28 10:56:53 +01:00
Olof hagsand
3dfc1f56a0 upgrade docs 2019-03-27 18:15:16 +01:00
Olof hagsand
be59bd48d8 upgrade example and test 2019-03-27 18:04:01 +01:00
Olof Hagsand
5fd092b785 reverted internal-rpc nacm rule 2019-03-26 16:26:07 +01:00
Olof Hagsand
3f3f70dfd6 xml changelog 2019-03-25 22:55:24 +01:00
Olof Hagsand
d3ac21a975 startup doc upgrade 2019-03-22 10:16:38 +01:00
Olof Hagsand
f4a19f6371 doc startup with new upgrade mechanism 2019-03-22 10:05:27 +01:00
Olof hagsand
0bf838eb8c added module-revision Yang 2019-03-19 11:55:44 +01:00
Olof hagsand
e8983a4be5 Upgrade repair test and docs 2019-03-19 10:04:16 +01:00
Olof hagsand
606245ef02 * Added flags to example backend to control its behaviour:
* Start with `-- -r` to run the reset plugin
  * Start with `-- -s` to run the state callback
* Rewrote yang dir load algorithm to follow the algorithm in [FAQ](FAQ(doc/FAQ.md#how-are-yang-files-found) with more precise timestamp checks, etc.
2019-03-18 16:31:34 +01:00
Olof hagsand
b3cd48468d Cleaned up after regression tests. New upgrade running docs. 2019-03-13 13:26:04 +01:00
Olof hagsand
b54e6c1cc0 example regression fail
FAQ table-of-content
2019-03-10 18:33:17 +01:00
Olof hagsand
b1c74b5f1f * Ensured you can add multiple callbacks for any RPC, including basic ones.
* Extra RPC:s will be called _after_ the basic ones.
  * One specific usecase is hook for `copy-config` (see [doc/ROADMAP.md] that can be implemented thus way.
* `rpc_callback_register` added a namespace parameter. Example:
   ```
     rpc_callback_register(h, empty_rpc, NULL, "urn:example:clixon", "empty");
   ```
2019-03-10 17:27:52 +01:00
Olof hagsand
748c7282ea typos 2019-03-08 11:31:12 +01:00