Commit graph

1276 commits

Author SHA1 Message Date
Olof hagsand
2eb9c6cda1 Refactored YANG min/max validation code, created new clixon_validate_minmax.[ch]
Added new recursive minmax check for non-presence containers
This makes validation checks stricter, including check of incoming RPCs
Renamed xml_yang_check_list_unique_minmax() to xml_yang_minmax_recurse()
Fixed again: [YANG min-elements within non-presence container does not work](https://github.com/clicon/clixon/issues/355)
2022-09-01 18:29:17 +02:00
Olof hagsand
c8bf718db8 replace xml_nopresence functions with xml_defaults_nopresence 2022-08-29 18:29:31 +02:00
Olof hagsand
ad7232d1ad Added top-level namespaces when pruning XML tree for client rpc calls and restconf GET
Added new xmlns_set_all()
2022-08-29 18:29:31 +02:00
Jan-Olof Carlson
2f0f1ef5a7 FC6243 with-defaults=report-all-tagged test cases and implementation added 2022-08-29 18:29:31 +02:00
Jan-Olof Carlson
8154943380 Server uses the explicit basic mode 2022-08-29 18:29:31 +02:00
Jan-Olof Carlson
9771feebf3 RFC6243 with-defaults=trim test cases and implementation added 2022-08-29 18:29:31 +02:00
Jan-Olof Carlson
14cc88ca39 Added parameter defaults to library function clicon_rpc_get 2022-08-29 18:27:07 +02:00
Jan-Olof Carlson
6bee1746e0 RFC8040 4.8.9. RESTCONF with-defaults Query Parameter 2022-08-29 18:27:07 +02:00
Jan-Olof Carlson
0a20348b3b rfc6243 with-defaults Capability for NETCONF 2022-08-29 18:27:07 +02:00
jiangxiaoming
b73cc75366 fix posix regular transform of char \w not include '_' char 2022-08-25 11:41:16 +08:00
Olof hagsand
a516ee173d Fixed: [YANG ordering fails for nested choice and action](YANG ordering fails for nested choice and action) 2022-08-24 13:02:38 +02:00
Olof hagsand
795ac0cc7d Clixon-netconf: Redirect logs to syslog by default, instead of stderr 2022-08-23 19:41:02 +02:00
Olof hagsand
ba39f88936 Fixed: [YANG min-elements within non-presence container does not work](https://github.com/clicon/clixon/issues/355) 2022-08-23 19:40:16 +02:00
Olof hagsand
ba9b313295 Restconf callhome: idle-timeout for periodic callhome 2022-08-22 11:27:02 +02:00
Olof hagsand
9a5504eed0 Fixed: [Issues with ietf-snmp modules](https://github.com/clicon/clixon/issues/353) 2022-08-18 18:07:29 +02:00
Olof hagsand
74da966096 Fixed: [Missing/no namespace error in YANG augments with default values](https://github.com/clicon/clixon/issues/354)
Tests: ensure all netconf requests with identityref have declared namespaces.
  * This is part of fixing [Yang identityref XML encoding is not general](https://github.com/clicon/clixon/issues/90)
2022-08-18 16:38:24 +02:00
Olof Hagsand
971ecb1b7f
Merge pull request #351 from krihal/build_macos
Make Clixon build on MacOS.
2022-08-16 11:47:36 +02:00
Kristofer Hallin
68b528ac0b Make Clixon build on MacOS. 2022-08-16 08:40:04 +02:00
Olof hagsand
5ac8bd2d03 Updated ietf-list-pagination YANGs to revision 2022-07-24 2022-08-12 16:13:32 +02:00
Olof hagsand
d1553471f7 Fixed: [Validation of mandatory in choice/case does not work in some cases](https://github.com/clicon/clixon/issues/349) 2022-08-10 13:25:30 +02:00
Olof hagsand
3a9b276deb Fixed struct sockaddr memory issues
Test: fixed docker yang repo copy
Test: disable restconf-callhome for fcgi
2022-07-31 11:33:02 +02:00
Olof hagsand
7d8ddf7697 Restconf RFC8071 call-home first working prototype 2022-07-31 09:59:52 +02:00
Olof hagsand
bed6d3c739 TEXT file format: Keep backward-compatible non-top-level prefix with compile-time option TEXT_SYNTAX_NOPREFIX
See https://github.com/clicon/clixon/issues/345
2022-07-26 18:10:27 +02:00
Olof hagsand
d7ed503bad Removed debugs, updated CHANGELOG 2022-07-26 12:47:58 +02:00
Olof hagsand
9d65fb81d7 * Break-out RFC 7950 Section 6.1 tokenization
* This enables full string lexical parsing of some rules previously not fully compliant, including:
    * refine
    * user-augment
    * if-feature
  * Also solves previous tokenization issues
2022-07-25 09:25:11 +02:00
Olof hagsand
f9eacebf68 Enable calling clicon_err_fn with fn=NULL 2022-07-22 18:36:53 +02:00
Olof hagsand
aaa18897ef Test: remove obsolete test_ openconfig_system
Add branch with-defaults to github workflow
Check in parameter in yang_extension_value
2022-07-22 16:57:46 +02:00
Olof hagsand
4514f2a538 Fixed: ["autocli:hide-show" extension cause bug in xmldb_put method #343](https://github.com/clicon/clixon/issues/343)
As a side-effect, added extra "autocliext" parameter to:
- clixon_xml2file()
- clixon_json2file()
- clixon_json2cbuf()
- clixon_txt2file()
2022-07-22 16:06:28 +02:00
Olof hagsand
89f8567f75 Refactoring of if-feature parse code
Moved if-feature sub-parser to clixon_yang_parse_sub.[ch]
2022-07-20 22:48:09 +02:00
Olof hagsand
1d78241115 Merge branch 'snmp' 2022-07-15 15:54:44 +02:00
Olof hagsand
96c6cef9a0 Fixed: [YANG mandatory statements within case nodes do not work](https://github.com/clicon/clixon/issues/344) 2022-07-15 13:05:01 +02:00
Olof hagsand
9537596a67 Fixed again: [Nested YANG choice does not work #342](https://github.com/clicon/clixon/issues/342)
Previous fix only for some sub-cases. New fix should work for all reecursive cases
2022-07-14 22:24:44 +02:00
Olof hagsand
657ddf9e87 Fixed: [Nested YANG choice does not work #342](https://github.com/clicon/clixon/issues/342) 2022-07-11 12:35:24 +02:00
Olof hagsand
4cf1d04cb7 Added XPATH function boolean()
* This caused problem for new NTP YANG in RFC 9249
Fixed segv on anydata for http parser
2022-07-08 15:12:28 +02:00
Olof hagsand
38027c8331 Added XPATH function boolean()
* This caused problem for new NTP YANG in RFC 9249
Fixed segv on anydata for http parser
2022-07-08 15:11:56 +02:00
Olof hagsand
19b210b1b6 Fixed if-feature-expr parser memory leak
Make test go directly to docker/main
2022-06-26 12:31:44 +02:00
Olof hagsand
f6fe9f6a64 SNMP: fix SNMP set access of table entries
[Conversion of ethernet address (PhysAddress) and IP address (IPAddress) crashes agent](https://github.com/clicon/clixon/issues/340)
Hwaddress and IP adress for scalar and table set should now work
2022-06-26 11:31:28 +02:00
Olof hagsand
6f7a33d196 SNMP frontend, new preli table handling code
Skipped data set and use table-helper only
Specialized SNMP error handling
2022-06-26 11:28:42 +02:00
Olof hagsand
05f3ebb59e SNMP frontend: SNMP2YANG type conversion for snmpset 2022-06-26 11:28:42 +02:00
Olof hagsand
aa95ead1cc SNMP frontend: Reworked types for GET types translation
YANG enum type, split up enum to int into two functions
2022-06-26 11:28:42 +02:00
Olof hagsand
46cb21f3e8 SNMP frontend: Generalized type handling for set functions
SPlit scalar_handler into get and set subfunctions
2022-06-26 11:28:42 +02:00
Olof hagsand
182b72a4cc SNMP frontend, RPC of single variable through clixon 2022-06-26 11:28:42 +02:00
Olof hagsand
df687f7180 Clixon SNMP frontend
Added two new config options to clixon-config.yang: `CLICON_HTTP_DATA_ROOT`
Added new files: apps/snmp/snmp_mib_yang.[ch] for generic MIB/YANG handling
Test: killall quiet
Test: added specific MIB for generic code: <CLICON_SNMP_MIB>NET-SNMP-EXAMPLES-MIB</CLICON_SNMP_MIB>
2022-06-26 11:28:42 +02:00
Olof hagsand
f112580546 SNMP MIB->YANG translation file handling.
Added configure option  --with-mib-generated-yang-dir=DIR with
default value /usr/share/mibyang where generated YANGs from MIBs
should be placed so that SNMP tests know where to find the YANGs.
2022-06-26 11:28:42 +02:00
Olof hagsand
e32cb81b49 Clixon SNMP frontend update
Integrated netsnmp agent and clixon event handling, made a workaround of fdset:s
used in the netsnmp API with sockets used in Clixon
Added a hardcoded MIB OID handler as subagent
Added libnetsnmpagent to autotools dependency check
New OE_SNMP error code
2022-06-26 11:26:04 +02:00
Kristofer Hallin
16d21bbe3b Move include of signal.h 2022-06-26 11:26:04 +02:00
Kristofer Hallin
01ea7594ce Include signal.h 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
33c77c8a09 Cleanup, debug stmts, diff vars and obsolete compile options 2022-06-23 15:40:47 +02:00