ConfD User Community

How to add the support of the get_next_object() callback to the 5-c_stats example?


#22

i want to CONFD return data of confd_tag_value_t type, which API should i should in client? as i know , maapi_get_objects just get confd_value_t


#23

We are getting the size of one list entry / object / row here, not the number of list entries / instances / objects / rows


#24

Try maapi_get_values() / cdb_get_values().


#25

@cohult, Do you know how confd only trigger get_next_object for Netconf request and confd still trigger get_next/get_elem for CLI. We use the external data provider and need to support 8k onts. Since get_next_object back-end code will stuck some while, we don’t want cli stuck. So we want to know how to trigger get_next_object only for Netconf request.
Much appreciated.


#26

I think it is recommended not to return huge amount of objects (8k) in get_next_object. You should limit it to cca 100 elements (make it perhaps configurable and try to find best value). Then CLI will be responsive as well. In several cases (e.g. TAB completion) ConfD can choose itself to call get_next instead of get_next_object


#27

Thanks @mnovak. Yes, we don’t return all the instances in one swoop and are trying out to find the best cca value. But actually, there are no customers complaining cli performance issue, so we don’t want to impact on CLI. We only want to support get_next_object for netconf request. I see there are “bulk hint” mentioned in confd_user_guide_6.7.4.pdf, but there are no further detail description. So I want to confirm whether confd can only trigger get_next_object for netconf somehow.
Much appreciated.


#28

HI @mnovak, I also have another block issue. Take a simple example: list ont
and list ont has nested-list vlan.
Since nested-list vlan can’t be returned to confd in the get_next_object for list ont, confd will trigger get_next_object for nested-list vlan. So there are large numbers of get_next_object for nested-list vlan, which is not efficient and consumes lots of time, right? So how to improve the loop of nested-list? By the way, “container children nodes” can be returned in get_next_object for list onts, and I use confd_data_reply_next_object_tag_value_arrays() and external data provider.
Much appreciated.


#29

Hello,

unfortunately I do not know know how to force get_next_object just on NETCONF. Usually ConfD should choose best method. I suggest you implement get_next_object returning cca 100 records and test the implementation together with get_next (and maybe also find_next and find_next_object if needed). CLI performance should not be affected.


#30

I thing for get_next_object same restriction applies as for get_object (see user guide - description of get_object):

However, although the tagged value array format can represent nested lists, these must not be passed via this function, since the get_object() callback only pertains to a single entry of one list. Nodes representing sub-lists must thus be omitted from the array, and ConfD will issue separate get_object() invocations to retrieve the data for those.


#31

HI @mnovak, thanks for your confirm. Now, I hit another block issue. There are “when statement” and “must statement” under some nodes in list, such as “/config/product/machine!= 'E3-16F”. Since there are substantial amounts of list instances, confd trigger lots of get-elem() request to validate “when/must statement”. I want to know whether confd can cache the “when/must statement” result and only trigger the first time for the same xpath.

Please refer to the below fragment:

DEBUG> 25-Aug-2019::20:15:12.961 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.963 Jessica-is-using confd[6524]: devel-c get_elem succeeded for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.967 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.969 Jessica-is-using confd[6524]: devel-c get_elem succeeded for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.971 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.974 Jessica-is-using confd[6524]: devel-c get_elem succeeded for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.976 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.979 Jessica-is-using confd[6524]: devel-c get_elem succeeded for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.983 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.986 Jessica-is-using confd[6524]: devel-c get_elem succeeded for callpoint config_cp path /exa:config/product/machine
25-Aug-2019::20:15:12.988 Jessica-is-using confd[6524]: devel-c get_elem request for callpoint config_cp path /exa:config/product/machine


#32

You may try to use ConfD cache for operational data. See ConfD user guide for confd.conf, search for /confdConfig/opcache.


#33

Thanks @mnovak. I tried out this /confdConfig/opcache in confd.conf by reference to ConfD user guide . But it doesn’t work for my case. My case is running configuration data and get-elem() requests are triggered by “when” validation.


#34

Regarding the above discussion, see also for example “tailf:cli-no-key-completion” as an option you may consider to prevent the CLI from querying the data provider for all existing keys.

Regarding “when” and “must” validation, that depends on how (in)efficient your XPath expression is.
Use for example the xpath.trace, see the confd.conf(5) man page under /confdConfig/logs/xpathTraceLog, to debug your xpath expressions. In addition: