Olof hagsand
77387e9c65
Merge branch 'master' of https://github.com/dcornejo/clixon into dcornejo-master
2019-03-06 10:03:58 +01:00
Olof hagsand
8cfd72c2c5
Merge branch 'develop'
2019-03-06 09:44:43 +01:00
Olof hagsand
98fb6eceef
* Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced.
...
* clixon-config YAML file has new revision: 2019-03-05.
* New URN and changed top-level symbol to `clixon-config`
* Removed obsolete `_CLICON_XML_NS_STRICT` variable and `CLICON_XML_NS_STRICT` config option.
2019-03-06 09:42:55 +01:00
Olof hagsand
01c8b0b836
* [Identityref inside augment statement]( https://github.com/clicon/clixon/issues/77 )
...
* Yang-stmt enhanced with "shortcut" to original module
2019-03-05 22:42:13 +01:00
Dave Cornejo
e2e465eb7b
remove redundant typedef that caused problems with some compilers
...
thanks to report from Piotr Kubaj against FreeBSD port:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236195
2019-03-04 09:24:42 -10:00
Olof hagsand
4b17af0278
* Strict XML Prefixed namespace check
...
* Yang augment created multiple augmented children (no side-effect)
* XML prefixed attribute names were not copied into the datastore
2019-03-04 19:15:23 +01:00
Olof hagsand
b182e8666f
[yang type range statement does not support multiple values]( https://github.com/clicon/clixon/issues/59 )
...
[Multiple ranges support](https://github.com/clicon/clixon/issues/78 )
Restructured "cb" parameter in cli_generate.c
2019-03-04 14:36:43 +01:00
Olof hagsand
fc93051b87
Fixed numeric ordering of lists (again) [ https://github.com/clicon/clixon/issues/64 ] It was previously just fixed for leaf-lists.
2019-02-28 17:07:24 +01:00
Olof hagsand
31304380cd
memleak for unknown in yang parser
2019-02-28 14:39:16 +01:00
Olof Hagsand
3dd67474e0
Merge branch 'master' of https://github.com/clicon/clixon
2019-02-28 13:12:06 +01:00
Olof Hagsand
a529546c88
Merge branch 'master' of https://github.com/clicon/clixon
2019-02-28 13:11:22 +01:00
Olof Hagsand
ff3ff0daa9
* There was a problem with ordered-by-user for XML children that appeared in so\
...
me circumstances and difficult to trigger. Entries entered by the user did not \
appear in the order they were entered. This should now be fixed by adding an enumeration to xml children for sorting ordered by user properly
2019-02-27 18:20:23 +01:00
Olof Hagsand
ceb5df2050
* New xml_isancestor xml function
...
* Fixed memleak test for upgrade
2019-02-27 16:33:51 +01:00
Olof Hagsand
f035c3ca23
* Removed all dependency on strverscmp
...
* Added libgen.h for baseline()
2019-02-27 10:46:05 +01:00
Olof hagsand
2394c6f46e
Merge branch 'modules-state'
2019-02-26 16:53:59 +01:00
Olof hagsand
560110b4e8
* New backend startup and upgrade support, see [doc/startup.md] for details
...
* Datastore files contain RFC7895 module-state information
2019-02-26 15:48:15 +01:00
Dave Cornejo
e282493095
FreeBSD compatibility & pedanticism patches
...
use ETIMEDOUT rather than ETIME - this seems more the intent of its
usage here and it compiles under FreeBSD & Linux.
in yang_spec_parse_file() the function basename() is not declared,
the declaration is in libgen.h, so include it. also basename() takes
char * for its argument not const char *, yang_spec_parse_file()
has to be changed to char *filename to compile w/o warnings
2019-02-22 19:59:14 -10:00
Olof hagsand
3c332b689f
Added cache for modules-state RFC7895 to avoid building new XML every get call
2019-02-21 15:06:20 +01:00
Olof hagsand
a20865846e
new try: optimized yang string parsing
2019-02-20 17:36:40 +01:00
Olof hagsand
8279c015d8
Revert "optimized string lex parsing"
...
This reverts commit 5b6bdbfd3a .
2019-02-20 16:26:01 +01:00
Olof hagsand
83edd29678
Revert "Revert "* Added valgrind memory leak tests in testmem.sh for restconf""
...
This reverts commit a73d2bd242 .
2019-02-20 16:25:42 +01:00
Olof hagsand
a73d2bd242
Revert "* Added valgrind memory leak tests in testmem.sh for restconf"
...
String error
This reverts commit 6e63f0a77b .
2019-02-20 16:19:07 +01:00
Olof hagsand
5b6bdbfd3a
optimized string lex parsing
2019-02-20 15:37:10 +01:00
Olof Hagsand
6e63f0a77b
* Added valgrind memory leak tests in testmem.sh for restconf
...
* Added clicon_socket_set() and clicon_socket_get() functions for cleaning up backend server and restconf FCGI socket on termination.
* Removed obsolete `-x` command-line option to clixon_cli.
2019-02-20 13:06:18 +01:00
Olof hagsand
28bd698968
[Issue with bare axis names]( https://github.com/clicon/clixon/issues/54 )
2019-02-19 22:56:18 +01:00
Olof hagsand
4c0b412e9f
Added valgrind memory leak tests for backend. Fixed some minor leaks and file descriptor closes.
2019-02-19 13:16:59 +01:00
Olof hagsand
057f4835db
Did not check for missing list keys in validate. [Key of a list isn't mandatory]( https://github.com/clicon/clixon/issues/73 )
2019-02-13 18:19:33 +01:00
Olof hagsand
ea8c84a372
Added new log function: clicon_log_xml() for logging XML tree
2019-02-13 11:35:49 +01:00
Olof Hagsand
f02310dcef
More on clixon base container on Alpine
2019-02-12 11:11:04 +01:00
Olof Hagsand
9cf4b0139a
compile on alpine
2019-02-11 17:44:29 +01:00
Olof Hagsand
024ba3439d
travis errors
2019-02-11 17:21:16 +01:00
Olof Hagsand
66d8573c00
Added docker/base as minimal clixon container and docker/system as full clixon system.
2019-02-11 14:17:29 +01:00
Olof Hagsand
2b596591f1
Added Clixon example full system docker container, see [docker/system].
2019-02-07 22:23:58 +01:00
Olof hagsand
19343c2b21
* Partially corrected: [yang type range statement does not support multiple values]( https://github.com/clicon/clixon/issues/59 ).
...
* Should work for netconf and restconf, but not for CLI.
* Fixed again: [Range parsing is not RFC 7950 compliant](https://github.com/clicon/clixon/issues/71 )
2019-02-05 14:03:58 +01:00
Olof hagsand
14343810ca
xml_cmp() compares numeric nodes based on string value [ https://github.com/clicon/clixon/issues/64 ]
2019-02-04 11:49:53 +01:00
Olof hagsand
02d725b2c0
* xml_cmp() respects 'ordered-by user' for state nodes, which violates RFC 7950 [ https://github.com/clicon/clixon/issues/63 . (Thanks JDL)
2019-02-03 16:19:33 +01:00
Olof hagsand
1e4022e73c
NACM cleanup, uniform rule function, change of function names, etc.
2019-02-02 11:35:50 +01:00
Olof hagsand
ef86cda2fe
NACM Data node WRITE access module support (RFC8341 3.4.5)
2019-01-30 10:02:17 +01:00
Olof hagsand
342b94fb76
nacm refactoring
2019-01-27 14:45:39 +01:00
Olof hagsand
ffecebf32a
* NACM Data node READ access module support (RFC8341 3.4.5)
...
* Access control points added for `get` and `get-config` in addition to incoming rpc.
* RFC 8341 Example A.2 implemented, see: [test/test_nacm_module.sh]
* Added `username` argument on `xmldb_put()` datastore function for NACM data-node write checks
* Added `xml_rootchild_node()` lib function as variant of `xml_rootchild()`
2019-01-27 13:26:15 +01:00
Olof hagsand
19f26e6838
* XML<>JSON conversion problems [ https://github.com/clicon/clixon/issues/66 ]
...
* CDATA sections stripped from XML when converted to JSON
2019-01-19 21:39:19 +01:00
Olof hagsand
66f80e9304
* xsd regular expression support for character classes [ https://github.com/clicon/clixon/issues/68 ]
...
* added support for \c, \d, \w, \W, \s, \S
2019-01-17 16:13:34 +01:00
Olof hagsand
03ac48ab2b
Removing newlines from XML data [ https://github.com/clicon/clixon/issues/65 ]
2019-01-16 23:17:07 +01:00
Olof hagsand
43b89af7f4
formatting
2019-01-14 21:24:03 +01:00
Jon Loeliger
15cb2385d4
JSON: Fix JSON formatting in the presence of namespaces.
...
- Fix array_eval() to allow sequential nodes that do not have
namepace nodes set as well as those that do.
- Fix comma placement in an array list where it was being dropped
between penultimate and last array elements.
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-01-14 13:34:41 -06:00
Olof hagsand
0267afcb21
* Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
...
* Added -p <dir> command-line option to all programs: backend, cli, netconf, restconf.
* Moved and updated all standard ietf and iana yang files from example and yang/ to `yang/standard`.
* Renamed example yang from example.yang -> clixon-example.yang
2019-01-13 17:34:15 +01:00
Olof hagsand
f48c8f45c6
* Date-and-time type now properly uses ISO 8601 UTC timezone designators.
...
* Renamed yang file `ietf-netconf-notification@2008-07-01.yang` to `clixon-rfc5277`.
* Cligen uses posix regex while yang uses XSD. It differs in some aspects. A translator function has been added for `\d` -> `[0-9]` translation, there may be more.
* [ietf-netconf-notification@2008-07-01.yang validation problem #62 ](https://github.com/clicon/clixon/issues/62 )
2019-01-11 17:30:08 +01:00
Olof hagsand
207858e20d
* Support of yangmodels supported, see test_yangmodels.sh
...
* Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
* Ignore CR(\r) in yang files for DOS files
2019-01-10 20:52:19 +01:00
Olof hagsand
c7e847cd24
Keyword "min" (not only "max") can be used in built-in types "range" and "length" statements.
2019-01-06 22:11:59 +01:00
Olof hagsand
bd67a2a5f2
Support for empty yang string added, eg default "";
...
if-feature added in yang parser at several places.
2019-01-06 16:31:36 +01:00