Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have custom callback for configuration data #1677

Open
sukesh9995 opened this issue Dec 3, 2024 · 3 comments
Open

Can we have custom callback for configuration data #1677

sukesh9995 opened this issue Dec 3, 2024 · 3 comments
Labels
is:question Issue is actually a question.

Comments

@sukesh9995
Copy link

Hi @michalvasko

module: test
+--rw leaf1
+--rw leaf2* [name]
+--rw name string
+--rw value1 string
+--rw value2 string

Is there any possiblity that when a get-config request comes client, can we register a callback so that we can send the custom data instead of the data stored in running database.

Regards,
Sukesh

@sukesh9995
Copy link
Author

Hi @michalvasko,

Basically can we get a callback for configuration data, so that we can frame the rpc and reply.

Regards,
Sukesh

@jktjkt
Copy link
Contributor

jktjkt commented Dec 4, 2024

That's typically not how sysrepo is used. What problem are you trying to solve this way, and what exactly are your requirements? Are you maybe syncing configs between multiple backends, etc?

@michalvasko
Copy link
Member

Is there any possiblity that when a get-config request comes client, can we register a callback so that we can send the custom data instead of the data stored in running database.

No, this is not possible and should be avoided. Such a design is bypassing the design of NMDA and I am guessing replacing it with something similar. So, you should instead understand the difference between running and operational datastore and then perhaps set some operational datastore callback, if required. Read through the NMDA RFC and understand how it is implemented in sysrepo by reading its docs.

@michalvasko michalvasko added the is:question Issue is actually a question. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

3 participants