Hi Helen,
get_object( ) works in practice according to the way it is described in the ConfD User Guide. ConfD will decide the most efficient way to retrieve the data from the external data provider on its own. If the get_object( ) call has been registered with ConfD, ConfD will invoke the get_object( ) call to retrieve the entire row of data from a list entry instead of the individual get_elem( ) calls to retrieve one data element at a time when list entries are being requested.
As is described in this post, when you invoke cli and perform the show arpentries operation, the get_object( ) call will be invoked instead of get_elem( ) as shown below:
admin connected from 127.0.0.1 using console on WAITAI-M-K092
WAITAI-M-K092# show arpentries
IP IFNAME HWADDR PERMANENT PUBLISHED
-----------------------------------------------------------
10.0.0.1 en0 58:23:8c:bf:2b:86 true false
TRACE New user session: 11 for user:admin ctx:cli --> CONFD_OK
TRACE CALL trans init(thandle=6,mode="r",db=running) --> CONFD_OK
TRACE CALL data get_next(thandle=6, /arpentries/arpe, -1) --> CONFD_OK
TRACE CALL data get_next(thandle=6, /arpentries/arpe, -1) --> CONFD_OK
TRACE CALL data get_object(thandle=6,/arpentries/arpe{10.0.0.1 en0}) --> CONFD_OK
TRACE CALL data get_next(thandle=6, /arpentries/arpe, 0) --> CONFD_OK
However, if you run the original example and perform the “show arpentries” operation from cli, the get_elem( ) calls will be invoked instead as shown in the following TRACE statements:
admin connected from 127.0.0.1 using console on WAITAI-M-K092
WAITAI-M-K092# show arpentries
IP IFNAME HWADDR PERMANENT PUBLISHED
-----------------------------------------------------------
10.0.0.1 en0 58:23:8c:bf:2b:86 true false
TRACE New user session: 12 for user:admin ctx:cli --> CONFD_OK
TRACE CALL trans init(thandle=12,mode="r",db=running) --> CONFD_OK
TRACE CALL data get_next(thandle=12, /arpentries/arpe, -1) --> CONFD_OK
TRACE CALL data get_next(thandle=12, /arpentries/arpe, -1) --> CONFD_OK
TRACE CALL data get_elem(thandle=12,/arpentries/arpe{10.0.0.1 en0}/hwaddr) ("58:23:8c:bf:2b:86") --> CONFD_OK
TRACE CALL data get_elem(thandle=12,/arpentries/arpe{10.0.0.1 en0}/permanent) (true) --> CONFD_OK
TRACE CALL data get_elem(thandle=12,/arpentries/arpe{10.0.0.1 en0}/published) (false) --> CONFD_OK
TRACE CALL data get_next(thandle=12, /arpentries/arpe, 0) --> CONFD_OK
Please feel free to list your specific example if it works differently.
Regards,
Wai