Extended cli_auto_show() with with-defaults argument, also changing its signature
Example: Added with-defaults argument to clispec
C-API: Added with-defaults argument to clicon_rpc_get_config
Replaced with-defaults prefix/namespace with constants
Added support for list x y;
Uses a mechanism to parse as unknown XML body and post-parsing replace with list keys
Fixed example and test to work with new TEXT syntax
New API is as follows:
* `clixon_xml2file()` - Print internal tree as XML to file
* `clixon_xml2cbuf()` - Print internal tree as XML to buffer
* `clixon_json2file()` - Print internal tree as JSON to file
* `clixon_json2cbuf()` - Print internal tree as JSON to buffer
* `clixon_cli2file()` - Print internal tree as CLI format to file
* `clixon_txt2file()` - Print internal tree as text format to file
* Added new text syntax parsing and loading from CLI
* Unified text output functions to `xml2txt` and moved to clixon_text_syntax.[ch]
* The following are removed: `cli_xml2txt` and `xml2txt_cb`
* Text output format changed:
* Namespace/modulename added to top-level
* See [Support performant load_config_file(...) for TEXT format](https://github.com/clicon/clixon/issues/324)
* Added `skiptop` parameter, if set only apply to children of a node, skip top node
* default is 0
* Functions are merged, ie removed and replaced with more generic functions
* `xml2json_cbuf()`: Added `skiptop` parameter: `xml2json_cbuf(..., int skiptop)`
* `xml2json()` and `xml2json_cb()` merged into `xml2json_file()` with `skiptop`
* Replace `xml2json(...)` with `xml2json_file(..., stdout, 0)`
* Replace `xml2json_cb(...)` with `xml2json_file(..., 0)`
* `clicon_xml2cbuf()`: Added `skiptop` parameter: `clicon_xml2cbuf(..., int skiptop)`
* `xml2cli()`: Added `skiptop` parameter: `xml2cli(..., int skiptop)`
Save state of netconf chunked framing between inputs
Treat EBADF in internal protocol (triggered by freebsd+notifications)
Test: chunked encoding: use printf instead of echo
* Load/save JSON config file did not work
* Added rfc7951 parameter to `clixon_json_parse_string()` and `clixon_json_parse_file()`
* If set, honor RFC 7951: JSON Encoding of Data Modeled with YANG, eg it requires module name prefixes
* If not set, parse as regular JSON
* Test: added test_db.sh for datastore format tests
* New automatic edit-mode design
* Control which modes to use with `edit-mode-default`
* Default is create edit-mode for all
* New edit-mode tree: @datamodelmode
* Extension `autocli-op` obsoleted and no longer supported
* You need to change to use clixon-autocli `hide`and `hide-show` instead.
* Translate as follows:
* `cl:autocli-op hide` -> `autocli:hide`
* `cl:autocli-op hide-database` -> `autocli:hide-show`
* `cl:autocli-op hide-database-auto-completion` -> `autocli:hide; autocli:hide-show`
* First version of clixon-autocli.yang semantics
* Default rules for module exclusion, list-keywords, completion, treeref-state
* Specialized rules for compress and exclusion of modules
* See [autocli documentation](https://clixon-docs.readthedocs.io/en/latest/cli.html#autocli)
* Obsoleted and moved autocli config options from clixon-config.yang to clixon-autocli.yang as follows:
* `CLICON_CLI_GENMODEL`, use: `autocli/module-default=false` instead
* Removed `clicon_cli_genmodel()`
* `CLICON_CLI_GENMODEL_TYPE`, use `autocli/list-keyword-default` and compress rules instead)
* Removed `clicon_cli_genmodel_type()`
* `CLICON_CLI_GENMODEL_COMPLETION`, use `autocli/completion-default` instead
* Removed `clicon_cli_genmodel_completion()`
* `CLICON_CLI_AUTOCLI_EXCLUDE`, use `autocli/rule/operation=exclude` instead
* `CLICON_CLI_MODEL_TREENAME`, use constant `AUTOCLI_TREENAME` instead
* Removed `clicon_cli_model_treename()`
* New YANG functions: yang_single_child_type, yang_find_namespace_by_prefix, yang_str2key
* Changed return values of yang_find_prefix_by_namespace
* Merged `cli_cli2xml()` into `cli2xml()`
* Added lastkey argument to yang_key_match()
* Fixed segv in process-sigchld
* Added ietf-yang-library to CLICON_CLI_AUTOCLI_EXCLUDE default value
* Added yang_spec_print() function
* Updated command-line usage of cli,netconf,backend apps in sync with clixon-docs user manual
* Documented differences between protocol stubs for external vs internal netconf
* These were included for testing
* If you want to run the Clixon test suite you need to point `YANGMODELS`, see test/README.md
* The following configure options have been removed:
* `configure --with-opt-yang-installdir=DIR`
* `configure --enable-optyangs`
* You may need to specify standard YANGs using configure option `--with-yang-standard-dir=DIR`
* Updated yang ietf models with fetures for tet
* Added option `CLICON_YANG_AUGMENT_ACCEPT_BROKEN` to accept broken yangmodels.
* This is a debug option for CI testcases where standard YANG models are broken
* Added ancestor config cache indicating wether the node or an ancestor is config false or true
* Improved yang cardinality lookup
* Added yang_init(), called from all apps using yang
* Some openconfig specs seem to have use/when before a "config" which it depends on. This leads to XML encoding being in the "wrong order.
* When parsing, clixon now sorts container/list statements so that sub-statements with WHEN are put last.
* See [Statements given in "load set" are order dependent](https://github.com/clicon/clixon/issues/287)
* Fixed: [Statements given in "load set" are order dependent](https://github.com/clicon/clixon/issues/287)
Changed semantics of locking: instead of relying of locking running-db,
an automatic lock bound to a session is maintained. When the session closes
the lock is released.
code not used (eg remaining) and avoiding an extra xpath_vec call.
Moved debug prints from plugin-callback-one to plugin-callback-all
Fixed memory error in data-cvec access function
* Merge branch 'dcornejo-master'
* Broke out pagination callback API from state data callbacks
* New pagination callback API uses new dispatcher from netgate, thanks @dcornejo
* Register callback with: `clixon_pagination_cb_register()`
* Use accessor functions `pagination_offset()`, `pagination_limit()`, etc
* Reverted state data callback API to pre-5.3 (see C/CLI API changes below)
* You need to change all statedata plugin callback for the new pagination feature
* If you dont use pagination you can ignore the values of the new parameters
* See [User manual pagination](https://clixon-docs.readthedocs.io/en/latest/misc.html#pagination)
* The updated callback signature is as follows:
```
int statedata(clicon_handle h,
cvec *nsc,
char *xpath,
pagination_mode_t pagmode, // NEW
uint32_t offset, // NEW
uint32_t limit, // NEW
uint32_t *remaining, // NEW
cxobj *xstate)
```
* The new callback contains parameters for paging
* Goal is to replace ca_statedata callback
* New plugin callback when lock/unlock occurs
* Add `ca_lockdb` tro plugin init to use it.
* Fixed: Typing 'q' in CLI more paging did not properly quit output
* Output continued but was not shown, for a very large file this could cause considerable delay
* Fixed: Lock was broken in first get get access
* if the first netconf operation to a backend was lock;get;unlock, the lock was broken in the first get access.