* Added sorting of YANG statements

* Some openconfig specs seem to have use/when before a "config" which it depends on. This leads to XML encoding being in the "wrong order.
  * When parsing, clixon now sorts container/list statements so that sub-statements with WHEN are put last.
  * See [Statements given in "load set" are order dependent](https://github.com/clicon/clixon/issues/287)
* Fixed: [Statements given in "load set" are order dependent](https://github.com/clicon/clixon/issues/287)
This commit is contained in:
Olof hagsand 2021-11-16 14:28:16 +01:00
parent a64464beda
commit acc9c083a4
11 changed files with 181 additions and 39 deletions

View file

@ -271,5 +271,6 @@ int yang_type_cache_set(yang_stmt *ys, yang_stmt *resolved, int options,
cvec *patterns, uint8_t fraction);
yang_stmt *yang_anydata_add(yang_stmt *yp, char *name);
int yang_extension_value(yang_stmt *ys, char *name, char *ns, int *exist, char **value);
int yang_sort_subelements(yang_stmt *ys);
#endif /* _CLIXON_YANG_H_ */