Skip to content

Commit

Permalink
tree printer FEATURE print augment definitions
Browse files Browse the repository at this point in the history
Relates to #24
  • Loading branch information
rkrejci committed Feb 11, 2016
1 parent bbbc79e commit 40f69b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/printer_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ tree_print_model(struct lyout *out, const struct lys_module *module)
unsigned int max_child_len;
int level = 1, have_rpcs = 0, have_notifs = 0;
char *indent = malloc((level * 4 + 1) * sizeof (char));
int i;

if (!indent) {
LOGMEM;
Expand Down Expand Up @@ -691,6 +692,16 @@ tree_print_model(struct lyout *out, const struct lys_module *module)
}
}

/* augment */
for (i = 0; i < module->augment_size; i++) {
ly_print(out, "augment %s:\n", module->augment[i].target_name);
LY_TREE_FOR(module->augment[i].child, node) {
tree_print_snode(out, module, level, indent, max_child_len, node,
LYS_CHOICE | LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST
| LYS_ANYXML | LYS_USES, 0);
}
}

/* rpc */
if (have_rpcs) {
ly_print(out, "rpcs:\n");
Expand Down

0 comments on commit 40f69b3

Please sign in to comment.