* xml_merge() changed to use 3-value return: 1:OK, 0:Yang failed, -1: Error

* `clixon_netconf_error(category, xerr, msg, arg)` removed first argument -> `clixon_netconf_error(xerr, msg, arg)`
* Renamed utility function `clixon_util_insert()` to `clixon_util_xml_mod()` and added merge functionality.
* Fixed: Insertion of subtree leaf nodes were not made in the crrect place, always ended up last regardless of yang spec (if ordered-by system).
This commit is contained in:
Olof hagsand 2020-04-17 15:47:37 +02:00
parent f401c07c4b
commit 0d4263e324
16 changed files with 376 additions and 274 deletions

View file

@ -70,12 +70,12 @@ LIBDEPS = $(top_srcdir)/lib/src/$(CLIXON_LIB)
# Utilities, unit testings. Not installed.
APPSRC = clixon_util_xml.c
APPSRC += clixon_util_xml_mod.c
APPSRC += clixon_util_json.c
APPSRC += clixon_util_yang.c
APPSRC += clixon_util_xpath.c
APPSRC += clixon_util_path.c
APPSRC += clixon_util_datastore.c
APPSRC += clixon_util_insert.c
APPSRC += clixon_util_regexp.c
ifeq ($(with_restconf),yes)
APPSRC += clixon_util_stream.c # Needs curl
@ -114,7 +114,7 @@ clixon_util_path: clixon_util_path.c $(LIBDEPS)
clixon_util_datastore: clixon_util_datastore.c $(LIBDEPS)
$(CC) $(INCLUDES) $(CPPFLAGS) @CFLAGS@ $(LDFLAGS) $^ $(LIBS) -o $@
clixon_util_insert: clixon_util_insert.c $(LIBDEPS)
clixon_util_xml_mod: clixon_util_xml_mod.c $(LIBDEPS)
$(CC) $(INCLUDES) $(CPPFLAGS) @CFLAGS@ $(LDFLAGS) $^ $(LIBS) -o $@
clixon_util_regexp: clixon_util_regexp.c $(LIBDEPS)