Skip to content

Commit

Permalink
Fix issues with "with-defaults"
Browse files Browse the repository at this point in the history
Adding "with-defaults" "report-all" defaults is complex. A new routine
has been added ("sch_add_defaults") to handle the complexity.

Both the restconf and netconf code for processing "with-defaults" has
been changed to use the new routine in other commits.

The routine sch_traverse_tree has been simplified as it no longer requires
the depth parameter to handle special netconf trees.
  • Loading branch information
gcampbell512 authored and carlgsmith committed Nov 12, 2024
1 parent 721635f commit b107386
Show file tree
Hide file tree
Showing 2 changed files with 391 additions and 155 deletions.
4 changes: 3 additions & 1 deletion apteryx-xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ typedef enum
GNode *sch_path_to_gnode (sch_instance * instance, sch_node * schema, const char * path, int flags, sch_node ** rschema);
bool sch_query_to_gnode (sch_instance * instance, sch_node * schema, GNode *parent, const char * query, int flags,
int *rflags, int *param_depth);
bool sch_traverse_tree (sch_instance * instance, sch_node * schema, GNode * node, int flags, int rdepth);
bool sch_traverse_tree (sch_instance * instance, sch_node * schema, GNode * node, int flags);
void sch_add_defaults (sch_instance *instance, sch_node *rschema, GNode **tree, GNode **query,
GNode *rnode, GNode *qnode, int rdepth, int qdepth, int flags);
GNode *sch_path_to_query (sch_instance * instance, sch_node * schema, const char * path, int flags); //DEPRECATED
void sch_gnode_sort_children (sch_node * schema, GNode * parent);
void sch_check_condition (sch_node *node, GNode *root, int flags, char **path, char **condition);
Expand Down
Loading

0 comments on commit b107386

Please sign in to comment.