Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,19 @@ np2srv_capabilities_oper_cb(sr_session_ctx_t *session, uint32_t sub_id,
}

if (lyd_new_list(datastore_capas, NULL, "per-node-capabilities",
0, &per_node_capas, '/')) {
0, &per_node_capas, "")) {
ERR("Failed to create per-node-capabilities.");
rc = -1;
goto cleanup;
}

if (lyd_new_term(per_node_capas, NULL, "node-selector", "/",
0, NULL)) {
ERR("Failed to create node-selector.");
rc = -1;
goto cleanup;
}

/* per datastore capabilities */
if (np2srv_add_subscription_capabilities(per_node_capas, ly_ctx)) {
ERR("Failed to add per node subscription-capabilities.");
Expand Down
3 changes: 1 addition & 2 deletions tests/test_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,7 @@ test_depth(void **state)
GET_DATA_FILTER(st, "ietf-datastores:running", filter, NULL, NULL, 0, 0, 1, 0, NC_WD_ALL);
expected =
"<get-data xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-nmda\">\n"
" <data>\n"
" </data>\n"
" <data/>\n"
"</get-data>\n";
assert_string_equal(st->str, expected);
FREE_TEST_VARS(st);
Expand Down