Olof hagsand
1c7e52f829
Merge branch 'autocli' of https://github.com/shmuelnatan/clixon into shmuelnatan-autocli
2021-04-22 20:56:04 +02:00
shmuels
5d18c02dfe
completing the function of hide for autocli-op in the yang files
2021-04-22 19:22:31 +03:00
shmuels
bfb7edece4
completing the function of hide for autocli-op in the yang files
2021-04-22 19:17:32 +03:00
shmuels
0ffff7844e
completing the function of hide for autocli-op in the yang files
2021-04-21 15:25:11 +03:00
shmuels
b0c5e43d50
completing the function of hide for autocli-op in the yang files
2021-04-21 15:15:35 +03:00
shmuels
33ad428854
completing the function of hide for autocli-op in the yang files
2021-04-21 15:09:40 +03:00
Olof hagsand
b88722fa25
- Restructure plugin module using a "module struct" rather than global variables.
...
This include plugin module init and exit functions
New type: clixon_plugin_t exposed via public API while struct clixon_plugin is private
- Makefile changes for static linkage using "LINKAGE=static"
- Moved nacm external init to later stage in backend_main
2021-04-19 11:06:40 +02:00
shmuels
cede620a2a
completing the function of hide for autocli-op in the yang files
2021-04-19 10:27:44 +03:00
shmuels
c370ac8706
completing the function of hide for autocli-op in the yang files
2021-04-18 16:58:18 +03:00
Olof hagsand
7ebb538ebf
- Changed master to 5.2.0.PRE
...
- Modified Makefiles for static linkage and coverage
- test namespace abstractions
2021-04-17 15:23:10 +02:00
Olof Hagsand
418f8f4c6f
Merge pull request #200 from nowaits/master
...
yang container add support for cl:autocli-op
2021-04-15 10:17:08 +02:00
Olof hagsand
c43e216d67
- Restconf bind: continue with other sockets if bind fails, print address on log
...
- Multi-yang: Look in CLICON_YANG_MAIN_DIR, not only CLICON_MAIN_DIRs for old yangs
- Backend -q quit option enhanced for multi-yang case
2021-04-13 18:00:27 +02:00
jxm
b938c0c40c
yang container add support for cl:autocli-op
2021-04-09 15:27:37 +08:00
Olof hagsand
692dc12c03
* Fixed ["aux" folder issue with Windows. #198 ]( https://github.com/clicon/clixon/issues/198 )
...
* Updated config scripts
* removed unused expand_dir util cli function
* Fixed again [making cli_show_options's output more human readable #199 ](https://github.com/clicon/clixon/issues/199 )
2021-04-07 09:44:18 +02:00
Olof hagsand
7412bb7b3d
Fixed [changing interface name not support with openconfig module #195 ]( https://github.com/clicon/clixon/issues/195 )
2021-04-06 22:36:46 +02:00
Olof hagsand
d8be601606
* To configure native mode use: configure --with-restconf=native, changed from: configure --with-restconf=evhtp
2021-04-06 08:48:45 +02:00
Olof hagsand
2def5d2367
* Fixed Yang parsing of comments in (extension) unknown statements, to allow multiple white space
...
* Fixed cli_start_shell: comments and cli_error
* Fixed [making cli_show_options's output more human readable #199 ](https://github.com/clicon/clixon/issues/199 )
* Fixed SSL/evhtp limited read buffer problem
2021-04-01 15:56:56 +02:00
Olof hagsand
477059f33d
Fixed again: [backend start resconf failed due to path string truncated #192 ]( https://github.com/clicon/clixon/issues/192 )
2021-03-24 12:23:00 +01:00
Olof hagsand
709459304f
* Removed cli_debug(). Use cli_debug_backend() or cli_debug_restconf() instead.
...
* Created restconf debug rpc stub function and documented restconf debugging
2021-03-22 14:56:05 +01:00
Olof hagsand
43db8dd5c5
Fixed: [state showing error in cli with CLICON_STREAM_DISCOVERY_RFC8040 #191 ]( https://github.com/clicon/clixon/issues/191 )
2021-03-18 10:41:08 +01:00
Olof hagsand
fb9917e81e
* Removed endtag parameter of clixon_xml_parse_file()
2021-03-15 13:24:27 +01:00
Olof hagsand
f536b1dc67
Added: CLICON_CLI_AUTOCLI_EXCLUDE
...
Added openconfig interfaces tests
2021-03-15 13:08:42 +01:00
Olof hagsand
f01efaf02a
fixed fcgi notification, genmodel
2021-03-10 14:45:18 +01:00
Olof hagsand
b7991d9b39
* Made a separate Clixon datastore XML/JSON top-level symbol
...
* Replaces the hardcoded "config" keyword.
* Implemented by a compile-time option called `DATASTORE_TOP_SYMBOL` option in clixon_custom.h
* Tests: added endtest to all tests. Removed all premature exits if BE=0
2021-03-05 14:15:15 +01:00
Olof hagsand
c509868345
Look for symbols in plugins using instead of for more portable use
2021-02-25 21:59:33 +01:00
Olof hagsand
108f94cfad
* Fixed: [Irregular ordering of cli command + help text when integer is a part of command #176 ]( https://github.com/clicon/clixon/issues/176 )
...
* Enabled by default `cligen_lexicalorder_set()` using strversmp instead of strcmp
2021-02-17 13:34:56 +01:00
Olof hagsand
a129756c6c
Fixed: [Is there an error with plugin's ca_interrupt setting ? #173 ]( https://github.com/clicon/clixon/issues/173 )
2021-02-15 12:54:09 +01:00
Olof hagsand
1f0147f996
removed unnecessary strerror() in clixon_err() calls; added 'function' keyword in all function declarations in the test scripts
2021-02-04 12:04:48 +01:00
Olof hagsand
68371d4fc5
upgrade copyright, aux tools, etc
2021-01-21 12:23:46 +01:00
Olof hagsand
96b50b88e8
Copyright 2021
2021-01-13 14:40:34 +01:00
Olof hagsand
7459925bd0
Limited fuzz by AFL committed, see [fuzz/README.md](fuzz/README.md) for details
2020-12-29 18:29:06 +01:00
Olof hagsand
96ab7292b9
* Added cvv_i output parameter to api_path_fmt2api_path() to see how many cvv entries were used
...
* CLIspec dbxml API: Ability to specify deletion of _any_ vs _specific_ entry.
2020-12-29 11:14:34 +01:00
Olof hagsand
b8641f30bd
* More YANG extension functionality,
...
* See [Augment auto-cli for hiding/modifying cli syntax #156 ](https://github.com/clicon/clixon/issues/156 ) and [hiding auto-generated CLI entries #153 ](https://github.com/clicon/clixon/issues/153 )
* Extensions can be used in augmentations
* Extension `autocli-op` has been added to add "hidden" commands in the autocli
* Documentation: https://clixon-docs.readthedocs.io/en/latest/misc.html#extensions
2020-12-08 17:21:37 +01:00
Olof hagsand
e1b94d94d2
* Ensure all fopen check for NULL (not -1)
...
* Improve test-perf cycles
2020-12-07 13:33:21 +01:00
Olof hagsand
19fb063f82
Support for building static lib:
2020-11-29 17:00:35 +01:00
Olof hagsand
542c0495b3
autocli sub fixes
2020-11-28 18:17:32 +01:00
Olof hagsand
75f85e0253
revert yang2cli sub code, use existing yang2cli solution
2020-11-27 15:31:27 +01:00
Olof hagsand
dda3244252
* Auto-cli changed singature of yang2cli()
...
* Auto-cli: create generated CLI for sub-parts of a YANG spec
2020-11-26 17:32:09 +01:00
Olof hagsand
9016dde319
Modify tests so they all work with evhtp and backend config, eg that CLICON_RESTCONF_CONFIG is default true.
...
Note that some tests are forced to CLICON_RESTCONF_CONFIG is false due to test complexities.
2020-11-18 13:57:25 +01:00
Olof Hagsand
a2bef12ce0
strncpy warnings fixed: stringop-truncation and stringop-overflow
2020-11-17 07:35:50 -06:00
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
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
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
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
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