get_state_data expects complete list of elements for a model for any get

60 views
Skip to first unread message

sbab...@gmail.com

unread,
Mar 2, 2015, 6:00:00 AM3/2/15
to neto...@googlegroups.com
Hi,

The get_state_date function generated for a model expects entire list of state elements in a model even when the 'get' request is made for a specific container/list/leaf in a model. The function prototype is given below.


xmlDocPtr get_state_data (xmlDocPtr model, xmlDocPtr running, struct nc_err **err)


Is this an expectation of libnetconf?
Filtering of requested fields seems to be done by libnetconf. Please confirm.

Regards,
Babu

Radek Krejčí

unread,
Mar 2, 2015, 6:38:58 AM3/2/15
to sbab...@gmail.com, neto...@googlegroups.com
Hi Babu,

yes, you are describing the libnetconf expectation. Filtering is done automatically by libnetconf after calling get_state_data() and merging status data together with the configuration data from the datastore.

Regards,
Radek


Dne 2.3.2015 v 12:00 sbab...@gmail.com napsal(a):

sbab...@gmail.com

unread,
Mar 2, 2015, 10:41:16 AM3/2/15
to neto...@googlegroups.com, sbab...@gmail.com
Hi Radek,

Thanks for the confirmation.

Regards,
Babu

sbab...@gmail.com

unread,
Mar 5, 2015, 2:37:15 AM3/5/15
to neto...@googlegroups.com, sbab...@gmail.com
On Monday, 2 March 2015 17:08:58 UTC+5:30, Radek Krejčí wrote:
Hi Radek,

It will always be very costly to provide all elements of a model for a single element GET in terms of memory and performance.

Is there any other way that only the corresponding element is GET for state data instead of full list?


Regards,
Babu

Radek Krejčí

unread,
Mar 5, 2015, 3:32:55 AM3/5/15
to sbab...@gmail.com, neto...@googlegroups.com
Hi Babu,
I know, but currently it is not a simple change that I could do in libnetconf. I have plans for several essential changes inside the libnetconf which I'd like to implement during this year and this is actually one of the areas that will be changed. Currently there is no other way to provide status data.

Best regards,
Radek

Dne 5.3.2015 v 08:37 sbab...@gmail.com napsal(a):

sbab...@gmail.com

unread,
Mar 5, 2015, 4:48:06 AM3/5/15
to neto...@googlegroups.com, sbab...@gmail.com
Hi Radek,

Thanks for the response.

Regards,
Babu
Reply all
Reply to author
Forward
0 new messages