lyb FEATURE less metadata for list node
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 1a3da5f..254f082 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -1325,6 +1325,66 @@
}
/**
+ * @brief Parse all list nodes which belong to same schema.
+ *
+ * @param[in] lybctx LYB context.
+ * @param[in] parent Data parent of the sibling.
+ * @param[in] snode Schema of the nodes to be parsed.
+ * @param[in,out] first_p First top-level sibling.
+ * @param[out] parsed Set of all successfully parsed nodes.
+ * @return LY_ERR value.
+ */
+static LY_ERR
+lyb_parse_node_list(struct lyd_lyb_ctx *lybctx, struct lyd_node *parent, const struct lysc_node *snode,
+ struct lyd_node **first_p, struct ly_set *parsed)
+{
+ LY_ERR ret;
+ struct lyd_node *node = NULL;
+ struct lyd_meta *meta = NULL;
+ uint32_t flags;
+
+ /* register a new sibling */
+ ret = lyb_read_start_siblings(lybctx->lybctx);
+ LY_CHECK_RET(ret);
+
+ while (LYB_LAST_SIBLING(lybctx->lybctx).written) {
+ /* read necessary basic data */
+ lyb_parse_node_header(lybctx, &flags, &meta);
+
+ /* create list node */
+ ret = lyd_create_inner(snode, &node);
+ LY_CHECK_GOTO(ret, error);
+
+ /* process children */
+ ret = lyb_parse_siblings(lybctx, node, NULL, NULL);
+ LY_CHECK_GOTO(ret, error);
+
+ /* additional procedure for inner node */
+ ret = lyb_validate_node_inner(lybctx, snode, node);
+ LY_CHECK_GOTO(ret, error);
+
+ if (snode->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) {
+ /* rememeber the RPC/action/notification */
+ lybctx->op_node = node;
+ }
+
+ /* register parsed list node */
+ lyb_finish_node(lybctx, parent, flags, &meta, &node, first_p, parsed);
+ }
+
+ /* end the sibling */
+ ret = lyb_read_stop_siblings(lybctx->lybctx);
+ LY_CHECK_RET(ret);
+
+ return LY_SUCCESS;
+
+error:
+ lyd_free_meta_siblings(meta);
+ lyd_free_tree(node);
+ return ret;
+}
+
+/**
* @brief Parse siblings (@ref lyb_print_siblings()).
*
* @param[in] lybctx LYB context.
@@ -1371,6 +1431,8 @@
ret = lyb_parse_node_opaq(lybctx, parent, first_p, parsed);
} else if (snode->nodetype & LYS_LEAFLIST) {
ret = lyb_parse_node_leaflist(lybctx, parent, snode, first_p, parsed);
+ } else if (snode->nodetype == LYS_LIST) {
+ ret = lyb_parse_node_list(lybctx, parent, snode, first_p, parsed);
} else if (snode->nodetype & LYD_NODE_ANY) {
ret = lyb_parse_node_any(lybctx, parent, snode, first_p, parsed);
} else if (snode->nodetype & LYD_NODE_INNER) {
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 10fea3f..fb395c9 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -1086,6 +1086,47 @@
}
/**
+ * @brief Print all list nodes which belong to same schema.
+ *
+ * @param[in] out Out structure.
+ * @param[in] node Current data node to print.
+ * @param[in] lybctx LYB context.
+ * @param[out] printed_node Last node that was printed by this function.
+ * @return LY_ERR value.
+ */
+static LY_ERR
+lyb_print_node_list(struct ly_out *out, const struct lyd_node *node, struct lyd_lyb_ctx *lybctx,
+ const struct lyd_node **printed_node)
+{
+ const struct lysc_node *schema;
+
+ /* register a new sibling */
+ LY_CHECK_RET(lyb_write_start_siblings(out, lybctx->lybctx));
+
+ schema = node->schema;
+
+ LY_LIST_FOR(node, node) {
+ if (schema != node->schema) {
+ /* all list nodes was printed */
+ break;
+ }
+
+ /* write necessary basic data */
+ LY_CHECK_RET(lyb_print_node_header(out, node, lybctx));
+
+ /* recursively write all the descendants */
+ LY_CHECK_RET(lyb_print_siblings(out, lyd_child(node), lybctx));
+
+ *printed_node = node;
+ }
+
+ /* finish this sibling */
+ LY_CHECK_RET(lyb_write_stop_siblings(out, lybctx->lybctx));
+
+ return LY_SUCCESS;
+}
+
+/**
* @brief Print siblings.
*
* @param[in] out Out structure.
@@ -1133,6 +1174,8 @@
LY_CHECK_RET(lyb_print_node_opaq(out, (struct lyd_node_opaq *)node, lybctx));
} else if (node->schema->nodetype & LYS_LEAFLIST) {
LY_CHECK_RET(lyb_print_node_leaflist(out, node, lybctx, &node));
+ } else if (node->schema->nodetype == LYS_LIST) {
+ LY_CHECK_RET(lyb_print_node_list(out, node, lybctx, &node));
} else if (node->schema->nodetype & LYD_NODE_ANY) {
LY_CHECK_RET(lyb_print_node_any(out, (struct lyd_node_any *)node, lybctx));
} else if (node->schema->nodetype & LYD_NODE_INNER) {