Hi ,
I have the following data-model.
container A
list B {
key "L1";
leaf L1 {
description " Index: 1..200";
mandatory true;
type uint16 {
range "1 .. 200";
}
}
leaf L2 {
mandatory true;
}
leaf L3 {
mandatory true;
}
}
}
Here , I shall configure only 10 indices.
So , when I implement my GetNext , I need to iterate only the 10 indices and return it to confd_data_reply_next_key .
I tried using cursor ,but that did not work.
Is there a way to return only the configured 10 indices rather than looping through all the 200 indices.
cohult
December 13, 2016, 9:14pm
2
HI,
I believe there is a misunderstanding of the purpose of get_next() here. See ConfD UG chapter 6.4 and 6.6. See also confd_lib_dp(3) man page “confd_register_data_cb” for details on the various callbacks you can implement with your data provider callpoint.
See also examples.confd/intro/5-c_stats example and this previous posting:
As this post explains for the get_object() callback:
In order to improve the performance of the data provider API callbacks, for both external configuration as well as operational data, when dealing with lists with many leaf elements in them, it is recommended to provide the implementation of the get_object() API. This will reduce the number of round trip calls from the ConfD daemon process for retrieving the leaf elements of each instance in your list as they will all be fetched with a single…