Commit graph

1310 commits

Author SHA1 Message Date
Olof hagsand
c31b1c471b * Changed first parameter from int fd to FILE *f in the following functions:
* clixon_xml_parse_file(), clixon_json_parse_file(), yang_parse_file()
  * See [Bytewise read() of files is slow #146](https://github.com/clicon/clixon/issues/146)
2020-11-04 22:21:42 +01:00
Olof hagsand
7a0838da3a * Restconf configuration has a new configure model: clixon-restconf.yang enabling restconf daemon configuration from datastore instead of from config file. 2020-11-03 21:26:34 +01:00
Olof hagsand
40da4421e6 pre-daemon callbaclk macro typo 2020-11-01 13:52:20 +01:00
Olof hagsand
5c5e45d10a Added new backend plugin: ca_pre-demon called if backend is daemonized just prior to forking. 2020-10-31 17:08:59 +01:00
Olof hagsand
1df420255e Fixed [Clixon backend generates wrong XML on empty string value #144](https://github.com/clicon/clixon/issues/144) 2020-10-28 14:28:34 +01:00
Olof hagsand
fab261cb53 * Added XPATH functions position 2020-10-27 09:40:45 +01:00
Olof Hagsand
8f81eb1c66
Merge pull request #145 from benavrhm/topic_benavrhm_doc_fix_20201023
Updated @retval doxygen specs for all functions
Thanks
2020-10-23 13:21:54 +02:00
Jonathan Ben-Avraham
f274a77414 Updated @retval doxygen specs for all functions
Updated the @retval doxygen specs for clixon_datastore_read.c
functions to match 4.8.0 API
2020-10-23 10:22:46 +03:00
Olof hagsand
ac13729cdc sleep 1 for docker test race condition 2020-10-20 10:46:46 +02:00
Olof hagsand
1614bcd19c Cleanup master for 4.9.0.PRE 2020-10-19 20:06:20 +02:00
Olof hagsand
6fdc42a42b Clixon 4.8.0 2020-10-18 17:27:45 +02:00
Olof Hagsand
85f069fa8a vagrant updates 2020-10-18 15:23:20 +00:00
Olof hagsand
e176330a74 * Removed string limit on cli prompt and cli mode name 2020-10-18 16:24:11 +02:00
Olof hagsand
f07f291bdd Main examples uses new auto-mode 2020-10-18 00:02:38 +02:00
Olof hagsand
a77cd27abb * Fixed: [namespace prefix nc is not supported](https://github.com/clicon/clixon/issues/143)
* Added more sanity checks on incoming top-level rpc and hello messages, including verifying top-level namespace
2020-10-17 18:04:46 +02:00
Olof hagsand
46bee9e358 Crash seen with startup mode as running with the XML_DB format being set to JSON. [clixon : 4.7.0] #138 2020-10-17 10:01:04 +02:00
Olof hagsand
4d35ace95f fix of performance enhancement commit for unique constraint 2020-10-16 15:43:37 +02:00
Olof hagsand
3d1ac2692d Fixed: Performance enhancement of unique list check (of duplicate keys) 2020-10-16 12:48:51 +02:00
Olof hagsand
b92fe441cd Fix tests after earlier non-config err commit 2020-10-15 21:36:59 +02:00
Olof hagsand
0b3391836f * Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang. 2020-10-15 21:35:14 +02:00
Olof hagsand
6465022f57 Find non-config nodes and mark/return error with better error message 2020-10-15 13:55:44 +02:00
Olof hagsand
6e81db18bb removed debug printf:s 2020-10-14 22:48:30 +02:00
Olof hagsand
fec6fbbd49 removed debug printf:s 2020-10-14 22:24:39 +02:00
Olof hagsand
7da98de695 uninitizlized variable 2020-10-14 12:55:21 +02:00
Olof hagsand
a41bd8aed3 Merge branch 'master' of https://github.com/clicon/clixon 2020-10-14 11:23:59 +02:00
Olof hagsand
2d56c9674a * New YANG generated auto-cli feature with syntax modes
* The existing autocli does not support modes, complete paths must be given, eg: `set a b c d 42`.
  * In the new auto-cli, automatic modes are present at each YANG syntax node level, eg the above can be given as: `edit a b c; set d 4; top`
  * The existing CLI API remains, the new API is as follows: `cli_auto_edit()`, `cli_auto_up()`, `cli_auto_top()`, `cli_auto_show()`, `cli_auto_set()`, `cli_auto_merge()`, `cli_auto_create()`, `cli_auto_del()`.
  * See `test/test_cli_auto.sh` for an example of the new API, and `apps/cli/cli_auto.c` for the source code of the new callback API.
  * Documentation will be appear and full integration with the main example.
* Added inline state field to clixon-example.yang
* Added new clicon_data_cvec_*() API for generic cvec structs
2020-10-14 10:54:10 +02:00
Olof hagsand
8d901e1fde * Extended CLI_PROMPT syntax with %W as working path in tree, which more concretely is a path to the current position in a syntax tree in the autocli.
* Comments on clixon-config.yang
2020-10-12 11:19:43 +02:00
Olof hagsand
f9cc26582a minor: strncpy -> strcpy and formatting 2020-10-10 15:32:19 +02:00
Olof hagsand
f8ac8cc14b typo on list check 2020-10-08 16:04:31 +02:00
Olof hagsand
5c67bcd364 validation of list keys rearrangement of code 2020-10-08 15:32:23 +02:00
Olof hagsand
469cbe0d64 Fixed: Accepted added subtrees containing lists with duplicate keys 2020-10-08 15:15:22 +02:00
Olof hagsand
8ae647c32b * More explanatory validation error messages for when and augments error messages.
* Example: error-message: `Mandatory variable` -> `Mandatory variable of edit-config in module ietf-netconf`.
2020-10-07 20:57:49 +02:00
Olof hagsand
1db43ca45b yang augment sanity checks 2020-10-05 15:49:22 +02:00
Olof hagsand
b7cb2e2526 tests and docker ports diffs 2020-10-04 16:06:55 +02:00
Olof hagsand
4d91bcd810 GET xpath on modstate was broken 2020-10-01 22:22:36 +02:00
Olof hagsand
09d33acd45 cli show options. doc and testing 2020-10-01 11:07:57 +02:00
Olof hagsand
6f2c4a076d * Configuration directory
* A new configuration option `CLICON_CONFIGDIR` has been added for loading of extra config files
  * If not given, only the main configfile is loaded.
  * If given, and if the directory exists, the files in this directory will be loaded alphabetically AFTER the main config file in the following way:
    * leaf values are overwritten
    * leaf-list values are appended
  * You can override file setting with `-E <dir>` command-line option.
* New clixon-config@2020-10-01.yang revision
  * Added option for configuration directory: `CLICON_CONFIGDIR`
2020-10-01 11:04:25 +02:00
Olof hagsand
b3545871c0 * Added stricter check on schema-node identifier checking, such as for augments.
* These checks are now made at YANG loading time
2020-09-29 20:53:24 +02:00
Olof hagsand
101a8cb6e0 minor fixes 2020-09-27 17:15:36 +02:00
Olof hagsand
9984cfa1c8 Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)
* Generalized default code for both config and state
2020-09-27 17:14:28 +02:00
Olof hagsand
da54dae396 Added sanity check that a yang module name matches the filename 2020-09-25 13:39:13 +02:00
Olof hagsand
21ac47915b More XPath function support
* `count`, `name`, `contains`, `not`, as defined in [xpath 1.0](https://www.w3.org/TR/xpath-10)
  * `deref`, `derived-from` and `derived-from-or-self` from RFC7950 Section 10.
    * in particular in augment/when statements
  * Improved error handling
    * Verification of XPath functions is done at startup when yang modules are loaded, not when XPaths are evaluated.
    * Separation of "not found" and "not implemented" XPath functions
    * Both give a fatal error (backend does not start).
2020-09-25 11:52:06 +02:00
Olof hagsand
2994d2f9a9 comments and typos 2020-09-22 22:41:59 +02:00
Olof hagsand
c616aa1569 Added support for XPATH functions:
* `contains`,
  * `derived-from` and `derived-from-or-self`
    * in particular in augment/when statements as shown in eg RFC 7950.
2020-09-22 22:40:42 +02:00
Olof hagsand
6d7b76550f Merge branch 'shmuelnatan-master' 2020-09-15 14:23:41 +02:00
Olof hagsand
9a76899482 Fixed cli show conflicts for https://github.com/clicon/clixon/pull/137 2020-09-15 14:22:40 +02:00
Olof hagsand
41ef682bdd 4.8.0.PRE 2020-09-15 12:12:26 +02:00
Olof hagsand
bf102ca575 4.7.0 2020-09-14 11:48:51 +02:00
Olof hagsand
70bdaf83bd clixon 4.7.0 2020-09-14 11:30:39 +02:00
Olof hagsand
1d333e39d1 4.7 preparations 2020-09-14 09:21:54 +02:00