Skip to content

Commit

Permalink
Fix issues with "with-defaults"
Browse files Browse the repository at this point in the history
The netconf code for processing "with-defaults" has been aligned
to be similar to the existing restconf code. In particular netconf is
now only passing the part of the tree that needs to have the
"with-defaults" modifications made to it.

A new routine has been added to detect if a query is only for leaf
fields. In that case when "with-defaults" is set to report-all, there
is no need to check if we need to add additional defaults.
  • Loading branch information
gcampbell512 committed Oct 31, 2024
1 parent a828e02 commit 6bceacc
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 166 deletions.
3 changes: 2 additions & 1 deletion apteryx-xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ 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);
bool sch_query_contains_only_leaves (sch_instance *instance, GNode *query, 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 6bceacc

Please sign in to comment.