Do ConfD support application specified annotations, "md:annotation"

Do ConfD support application specified annotations?
The description in rfc7952 is that you can annotate Yang instance data with own defined annotation(s).
We would like to use it to tag meta data for our use cases for example tag it as privacy data.
If we specify an annotation in a yang module with the md:annotation extension, is that supported by ConfD?

For example
md:annotation privacy-tag {
type string;
description
“This annotation contains the privacy tag of the privacy data.”;
}

if it supported, how would that metadata be managed when implementing an external database? I guess it supposed to be based on get_Attrib/set_Attrib callbacks.

Also we would like to check if it is possible to make the annotation readonly, meaning it can’t be set via CLI/netconf interface, only internally populated.

No, you can’t define your own annotations. ConfD implements a few annotations based on rfc7952 that you can use:

  • “tags” - type string
  • “annotation” - type string
  • “inactive” - type boolean
  • “origin” - type string
    (- “backpointer” - type string, internal use)

Of the above, the “annotation” and “tags” attributes are likely what you are looking for here. To enable those “meta-data attributes”, /confdConfig/enableAttributes in confd.conf (see the confd.conf(5) man page) must be set to true.

See ConfD UG chapter “Configuration Meta-Data” for an overview and pointers to details.

To serve the above from an external database, see the get_attrs() and set_attrs() callbacks, and the callback reply functions:

  • confd_data_reply_attrs() - get attrs()
  • confd_data_reply_next_key_attrs() - get_next(), find_next()
  • confd_data_reply_tag_value_attrs_array() - get_object()
  • confd_data_reply_next_object_tag_value_attrs_array() - get_next_object(), find_next_object()
  • confd_data_reply_next_object_tag_value_attrs_arrays() - get_next_object(), find_next_object()