Snmp set is overwriting a confd list

I have defined a list in my yang file which will store strings.
When i load the values for the list in confd, the list gets appended.

When i did the same via a snmp set the list is overwritten and only the last set string is stored in the CDB.

Is there any specific command to be used for snmp set for list data types of yang ?

See for example README descriptions in the “examples.confd/snmpa/7-transform” and “11-different-keys” ConfD examples how snmpset and setting RowStatus to “createAndGo” is used to add list objects to a list.

Hi Cohult
Sorry there was a mistake on my part, its not a list but a leaf-list

container xyz {

     leaf-list abc {

snmp set for the leaf-list abc is always overwritten, instead of appending the leaf-list, i tried CreateAndGo but looks its not helping.
Any other suggestions to effectivily append the list using snmpset without overwriting it.


the behavior in CLI is sort of a ConfD CLI “usability enhancement”, and can be disabled using the “tailf:cli-replace-all” annotation for the leaf-list element in your model.

The leaf-list if not a full list collection of records, but acts as a “single” element.
From the SNMP protocol point of view, setting if to specific “one value” (one specific array of values) is what is done, there’s no append/remove-from operation defined, only explicit setting/deletion of a whole array as such…

In addition to @josephm 's reply, the confd_types(3) man page is a good source of information on different types. Regarding leaf-list’s:

The leaf-list statement

The values of a YANG leaf-list node is represented as an element with a list of
values of the type given by the type sub-statement.

    value.type = C_LIST

    union element = list

    C type = struct confd_list

    SMIv2 type = OCTET STRING

I.e. when using SNMP it’s an octet string.

Thanks @josephm and @cohult