Hi all,
I see that maapi_delete()
can be used only to delete lists, presence containers, etc. It can’t be used to set leafs to their default values.
I read about C_DEFAULT
in the documentation and then tried to do the following:
confd_value_t value;
memset(&value, 0, sizeof(value));
value.type = C_DEFAULT;
if (maapi_set_elem(maapi_sock, tid, &value, xpath) != CONFD_OK) {
...
}
Unfortunately it didn’t work, maapi_set_elem() returned this error: expected type uint8, got unknown
.
With that said, what would be the preferable way to set a leaf to its default value using MAAPI (if at all possible)?