Clarification on Redis-Plugin and Data Fetching in Netopeer
Closed this issue · 4 comments
Hi,
I am currently working with the Redis DB plugin in the context of Netopeer and Sysrepo, and I was hoping to clarify how data is fetched from Redis when triggered by a get-config operation. Initially, I assumed that the process involved a direct call to the Redis plugin via Sysrepo, with some form of query being executed to retrieve and parse the data. However, after tracing the callback function np2srv_rpc_get_cb, I believe my initial understanding may be incorrect, as the flow appears to be different.
Could you kindly help me understand how exactly the data is parsed and fetched in this case? Specifically, I would appreciate any guidance on how the Sysrepo plugin, Netopeer library, and the Redis plugin interact during the get-config operation, and how I can use them to retrieve data from Redis.
Thank you in advance for your time and assistance. I look forward to your response.
Best regards,
Vishal
To answer you exactly I would need to know the reason why you are looking into this. But chances are you can safely ignore how netopeer2 interacts with sysrepo and just focus on the redis plugin itself, reading data is performed by the load function.
Thank you for the reply @michalvasko
I actually wanted to fetch data directly from redis as the sysrepo stores data of yang models in redis.
So i wanted to get a reference how library was handling or processing the data. That's why i asked this query.
If there's any way.
You will have to go through the code to find out how exactly is everything stored.
Thanks @michalvasko
I was able to fetch and parse the data accordingly