On validation callbacks, XML_FLAG_ADD is added to all nodes at startup validation, not just the top-level. This is the same behaviour as for steady-state validation.

This commit is contained in:
Olof hagsand 2019-06-19 21:54:59 +02:00
parent af720e8f28
commit c3245f0600
2 changed files with 4 additions and 1 deletions

View file

@ -69,7 +69,9 @@
### API changes on existing features (you may need to change your code) ### API changes on existing features (you may need to change your code)
* On validation callbacks, XML_FLAG_ADD is added to all nodes at startup validation, not just the top-level. This is the same behaviour as for steady-state validation.
* All hash_ functions have been prefixed with `clicon_` to avoid name collision with other packages (frr) * All hash_ functions have been prefixed with `clicon_` to avoid name collision with other packages (frr)
* All calls to the following functions must be changed: `hash_init`, `hash_free`, `hash_lookup`, `hash_value`, `hash_add`, `hash_del`, `hash_dump`, and `hash_keys`.
* RESTCONF strict namespace validation of data in POST and PUT. * RESTCONF strict namespace validation of data in POST and PUT.
* Accepted: * Accepted:
``` ```

View file

@ -214,7 +214,8 @@ startup_common(clicon_handle h,
xt = NULL; xt = NULL;
x = NULL; x = NULL;
while ((x = xml_child_each(td->td_target, x, CX_ELMNT)) != NULL){ while ((x = xml_child_each(td->td_target, x, CX_ELMNT)) != NULL){
xml_flag_set(x, XML_FLAG_ADD); xml_flag_set(x, XML_FLAG_ADD); /* Also down */
xml_apply(x, CX_ELMNT, (xml_applyfn_t*)xml_flag_set, (void*)XML_FLAG_ADD);
if (cxvec_append(x, &td->td_avec, &td->td_alen) < 0) if (cxvec_append(x, &td->td_avec, &td->td_alen) < 0)
goto done; goto done;
} }