The key for more complex paths in the map containing information of update events should be improved
Description
After receiving an update via gNMI-Subscribe, the controller forwards this information via the RabbitMQ server. The sent payload contains so called 'Events' including a map which uses the following as its key: the key is created by using the path on which the change in the network element occured. For simple paths like system/config/hostname
, the method of parsing the path of the gNMI-Notification worked well. But for more complex paths like ones with lists, the method doesn't work that well anymore. For example, the resulting path of subscribing to qkd_node/qkd_links
when using the currently implemented method looks as follows:
qkd_node/qkd_links/qkd_link" key:{key:"qkdl_id" value:"acde2729-3544-41c3-88cb-9a9b82efeff0"/qkdl_status/
(this is the exact string used as key).
This kind of string is hard to deal with as a key of the previously mentioned map. Therefore, the method of parsing the path of the gNMI-Notification should be improved. The exact method that needs to be improved is handleSubscribeResponseUpdate
in networkElementWatcher.go