Commit graph

2012 commits

Author SHA1 Message Date
Olof hagsand
d72aa58f90 Initial Net-snmp frontend commit
Added apps/snmp with makefiles, autotools, docker adjustment
Minimal snmp_main program
2022-06-26 11:26:04 +02:00
Olof hagsand
a00e36caa2 * Full RFC 7950 if-feature-expr support (Section 7.20.2)
* Previous implementation did not handle nested if-feature expressions
  * As part of fixing: [YANG if-feature does not support nested boolean expression](https://github.com/clicon/clixon/issues/341)
  * Added new yacc/lex parser for if-feature-expr string
2022-06-26 10:58:43 +02:00
Olof hagsand
5bb3767358 Workaround for [YANG if-feature does not support nested boolean expression](https://github.com/clicon/clixon/issues/341) 2022-06-24 11:29:42 +02:00
Olof hagsand
05918e3ca2 Test: change make test from all -> sum, make vagrant yang checkout more resilient
New slack invite
2022-06-23 16:37:22 +02:00
Olof hagsand
33c77c8a09 Cleanup, debug stmts, diff vars and obsolete compile options 2022-06-23 15:40:47 +02:00
Olof hagsand
bdb516fec9 YANG Action (RFC 7950 Section 7.15)
See [Support for "action" statement](https://github.com/clicon/clixon/issues/101)
2022-06-21 15:44:02 +02:00
Olof hagsand
87c65c3541 Fixed: [RPC edit-config payloads are not fully validated](https://github.com/clicon/clixon/issues/337) 2022-06-20 15:08:50 +02:00
Olof Hagsand
7c22021242
Merge pull request #336 from pheller/fix-test-readme
Update README.md
2022-06-14 09:46:43 +02:00
Phillip Heller
75abfb8204
Update README.md
https://github.com/YangModels/yang default branch appears to be named "main", not "master"
2022-06-13 11:09:58 -06:00
Olof hagsand
0b16797a45 * Added: [Feature Request: Log SSL events](https://github.com/clicon/clixon/issues/331)
* Added syslog NOTICE on failed user certs
2022-06-08 13:22:38 +02:00
Olof hagsand
609e27e0c2 Augmented XML uses default namespace
* Instead of using prefixes for augmented XML, assign the default namespace
Test: moved datastore format tests from test_cli to new test_datastore_format
2022-06-08 11:49:48 +02:00
Olof hagsand
db8cf75077 Test: Fixed: show netconf pretty 2022-06-07 14:21:40 +02:00
Olof hagsand
b1cb774c9d TEXT output/parser: fix space-separated leaf/leaf-lists 2022-06-07 13:23:05 +02:00
Olof hagsand
01b38c6645 Fix text parser leaf-list / leaf succession
See https://github.com/clicon/clixon/issues/324
2022-06-06 15:40:07 +02:00
Olof hagsand
4f9ed02a46 Text syntax parser/loader, fixed double leaf-list issue
Test: extended test_cli with format 4x tests
2022-06-03 14:03:01 +02:00
Olof hagsand
625a0ed19a Cleaned up prettyprint->pretty, use yang_cvec_set access function 2022-06-03 14:01:56 +02:00
Olof hagsand
b6bfcb69f7 Text syntax parser/loader
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
2022-06-02 19:28:49 +02:00
Olof hagsand
0c79298e76 Changed C-API for xml translation/print the internal cxobj tree data structure to other formats
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
2022-06-01 20:02:27 +02:00
Olof hagsand
87719c623c Text syntax parser/loader
Leaf-list syntax using: "id [ leaf leaf ...]" syntax for output and input
Variables using \n\r in text
Added clixon_xvec_merge()
2022-06-01 11:08:19 +02:00
Olof hagsand
820ed5686b Text syntax parser/loader
Added string quites around text containing spaces
Added support for colon in text
2022-06-01 11:07:55 +02:00
Olof hagsand
2ece0b8f51 * Experimental text syntax parser/loader
* 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)
2022-06-01 11:07:15 +02:00
Olof hagsand
43a57dad79 Changed C-API for xml translation/print to other formats.
* 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)`
2022-06-01 10:48:39 +02:00
Olof hagsand
724b94137f Test, fixed the fix of previous commits 2022-05-30 15:47:54 +02:00
Olof hagsand
ebe3d8e454 Test: fixed an occasional error in actions depending on hostname inclduing '92' 2022-05-30 15:36:37 +02:00
Olof hagsand
8e6ba7fa53 test of cligen expand bug #332 2022-05-30 15:27:19 +02:00
Olof hagsand
5740d37737 Clixon 5.8.0.pre 2022-05-30 12:30:37 +02:00
Olof hagsand
cca8c88ec1 5.7.0 release 2022-05-17 11:45:43 +02:00
Olof hagsand
0adeae64df Clixon 5.7.0 2022-05-16 19:44:32 +02:00
Olof hagsand
50fcedafac Make socket read (SSL_read) error handling more resilient: log and continue instead of exit 2022-05-16 19:34:00 +02:00
Olof hagsand
3a336838f7 Fixed a cornercase of RFC 7950 Sec 7.9, a choice witout case with sub-containers 2022-05-16 13:12:59 +02:00
Olof Hagsand
5bd64712c7 Tests: disabled: valgrind and pagination, restconf notification 2022-05-13 15:02:20 +00:00
Olof hagsand
7b099a5685 Fixed Restconf nghttp2 client EPIPE crash 2022-05-13 13:34:06 +02:00
Olof hagsand
c3b120b364 Test: netconf -H flag replaced with -1 caused valgrind fails 2022-05-12 21:49:34 +02:00
Olof hagsand
d153bfcd0c Test: restconf notification parallel disabled. start script -l removed 2022-05-12 16:17:26 +02:00
Olof hagsand
9cbe313712 * Fixed: [Keywords containing '-' hyphen are missing from the auto-completion list](https://github.com/clicon/clixon/issues/330)
* Fixed by disabling `cligen_preference_mode`. This may have other side effects.
2022-05-12 14:54:53 +02:00
Olof hagsand
0c81b66ef3 Fixed: [Returning a string while Querying leaf-list for single entry](https://github.com/clicon/clixon/issues/326) 2022-05-12 12:04:13 +02:00
Olof hagsand
7065d6f760 Test: restconf CN variable, strip curl newline
Fixed a few compile warnings
2022-05-12 09:40:12 +02:00
Olof hagsand
c27ecf0923 Test: added test of CLI rest variables with delimiters 2022-05-10 17:37:55 +02:00
Olof hagsand
a49cf41d1e * CLI expansion of leafrefs default behavior changed
* In the autocli and handcrafted CLI:s using `expand_dbvar()` the CLI expansion followed the leafrefs to the sources, ie the origin of the leafrefs
    * Instead leafref expansion now only looks at the leafrefs
2022-05-10 10:06:43 +02:00
Olof hagsand
614c927343 * Added nsc parameter to xml2xpath() and ensured the xpath uses prefixes.
* Old code: add `NULL` as second parameter
2022-05-09 13:48:07 +02:00
Olof hagsand
82a0670031 Docker test: copy clixon.png for http-data test 2022-05-05 18:32:22 +02:00
Olof hagsand
7452813da7 Http data server Fixed binary data retrieval 2022-05-05 18:08:45 +02:00
Olof hagsand
90474d1523 Fixed: A long TLS+HTTP/2 request such as by a browser causing block of other requests.
Test: Disabled privileges test if clixon_restconf started with -r
2022-05-02 10:31:53 +02:00
Olof hagsand
463aa15544 Restconf compile warnings and docs 2022-05-02 10:28:24 +02:00
Olof hagsand
5551d753ef Logging fixes
* Fixed: [Error message seen twice in some cases](https://github.com/clicon/clixon/issues/325)
* Extended `-l` command-line option to all clixon commands with a `none` option, eg `-l n` directs logging to `dev/null`
2022-04-30 11:31:51 +02:00
Olof hagsand
ef302f0c05 Fixed: [if choice is declared with multiple elements or leaf-list with in a case scope , addition or updation is not happening as expected](https://github.com/clicon/clixon/issues/327)
* This includes several choice/case adjustments to follow RFC 7950 Sec 7.9 better
2022-04-29 19:16:56 +02:00
Olof hagsand
28bd146e5c Added clixon_netconf command-line option -0and changed -H to -1
* `-0` means dont send hello, but fix netconf base version to 0 and use EOM framing
    * `-1` means dont send hello, but fix netconf base version to 1 and use chunked framing
2022-04-29 19:07:12 +02:00
Olof hagsand
f11e4bad6c Http data server changes
* Indirect redirects from directory to `index.html`
  * Added `HTTP_DATA_INTERNAL_REDIRECT` compile-time option
* Added CLICON_RESTCONF_API_ROOT to clixon-config.yang
* Added 404 return without body if neither restconf, data or streams prefix match
* Fixed: HTTP/1 parse error for '/' path
2022-04-28 16:17:07 +02:00
Olof hagsand
84d88c8ad8 Restconf http-data server updates
Check data paths for .., ~ and soft links
Changed semantics of `CLICON_HTTP_DATA_PATH` and `_ROOT`
Change URI catch-all to 404 instead of 400
Fixed some memory leaks
2022-04-26 17:42:53 +02:00
Olof hagsand
0ed8b836b1 Test: Ensured HVER/RCPROTO work as envvars to test and documented it 2022-04-23 17:23:41 +02:00