Good day,
I have a question regarding lists with mixed config- and op-data leafs. Assuming we have a YANG defined as;
list mylist {
key list_index;
leaf list_index {
type int32;
}
leaf config_data {
config true;
type string;
}
leaf oper_data {
config false;
type string;
}
}
The scenario is that we would like to save a set of operational data, to leaf “oper_data”, and evetually also write some config data to “config_data”.
From what we understand we need to use the management-agent-API to write config data, as opossed to writing op data using the cdb-API. So whenever we save op-data we need to use a cdb-API cdb_create() to populate a list, but when we save config data we have to use maapi_create(). As such we find it a bit tricky to have to know what type of data we are writing to the leafs, in order to create a list instance.
Assuming we want to save a lot of op-data prior to config data, does it not impose a heavy load on ConfD using maapi_create() multiple times to register op-data? Or are we missing something here?