So the rw fields are getting processed as below:
1.subscribed to list through cdb_subscribe
2.on modification of the rw fields processing through MOP_VALUE_SET option of cdb_diff_iterate callback.
I am not having issue for RW fields that ie.channel-bandwidth etc…
Now the issue how to configure/process these whenever i get a request from netconf-console .
1.Currently i am trying to load read only fields through confd_load but this is possible only if the complete list is read only.Because the key field of this list ie “name” is RW. so i am not able to do this way.
Please help me in solving the issue.Also if you can provide a sample example will be really helpful.
Correct we can do that way.
Currently I am loading only the default values of operational data and configuration data those key field is read only through confd_load in two phase.
confd_load -i -o -m -l /etc/confd/factory_settings_uplane-conf.xml
confd --smp 2 -c /etc/confd.conf --start-phase1
confd_load -O -m -l /etc/confd/factory_settings_uplane-conf.xml
Since i am not providing any key value to name field as it can be modified by client at any point of time.Because of that i am getting error
“confd_load: 618: maapi_load_config(sock, tid, flags, abspath(argv)) failed: external error (19): Error on line 10: missing element: name in /o-ran-upl/o-ran-uplane-conf:tx-array-carriers”
< user-plane-configuration xmlns=“urn:o-ran:uplane-conf:1.0” >
< tx-array-carriers >
< state > NORMAL < /state >
< /tx-array-carriers >
< /user-plane-configuration >
If you can provide solution such that for any key value of “name” field the state field will be assigned to particular value.Even though client creates multiple entries in list.
OR Since the list can have maximum of three number of entries then for first index irrespective of any key value the state field will be assigned to some fixed value. Similarly for other indexes also.
The best way is to handle this dynamically in a ConfD client application. The operational data (or read-only fields) can be added through a CDB subscriber. Whenever a new list instance is created by the a NETCONF client, the pertinent operational data should be created dynamically in your CDB subscriber code.
I was trying to implement as you said.But couldn’t able to implement.
So can you please help me in providing a sample example having list having both read only & R/W field.It will help me in understanding the same.
For the oper data to be stored in CDB, you can check out examples.confd/cdb_oper/ifstatus and see how the oper data is getting updated periodically.
For the oper data to be accessed through the external database, you can check out examples.confd/webui/basic and look through the implementation for get_elem in oper_data.c. Assuming you are a premium user and have access to the WebUI examples.