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

Multiple models for gnmi target #253

Open
adibrastegarnia opened this issue Dec 16, 2020 · 8 comments
Open

Multiple models for gnmi target #253

adibrastegarnia opened this issue Dec 16, 2020 · 8 comments

Comments

@adibrastegarnia
Copy link

In the current implementation of gnmi target, a single model is initialized and used for implementing of the server. I would like to know how we can run multiple models using a single gnmi agent? Does it make sense to do that?

@samribeiro
Copy link
Member

The current server with a single model was created as a simple reference implementation. Adding support to use multiple models would be a nice to have.

@adibrastegarnia
Copy link
Author

@samribeiro
I would like to hear your ideas if you want to implement it yourself. What is the best way to tackle this problem? Do you think Can we have one single tree which can support multiple model schemes?

@samribeiro
Copy link
Member

@adibrastegarnia I think the best path forward is to have a binary that dynamically supports the models that it gets loaded with. As oposed to have a static model at compile time.

@adibrastegarnia
Copy link
Author

@samribeiro
Thanks for your response. Yeah we are almost doing the same thing in a project but my question mostly is about the tree data structure which holds information about config tree. It looks like a tree per model will be needed to be created in the memory correct?

@samribeiro
Copy link
Member

@adibrastegarnia it depends on what you are aiming for. For this specific case where the intent is to mock model hierarchies and their leaf values, then having data in memory is paramount.

@adibrastegarnia
Copy link
Author

@samribeiro
I see. We are implementing a gnmi agent for configuration of an application. Technically, modeling an app as a device entity which can be configured via gnmi. I am trying to see if a model driven approach should be used or should we use a map[string]interface which holds paths/values independent of the scheme. The requests that are coming to the agent will be verified by onos-config which validates the requests based on the model.

@adibrastegarnia
Copy link
Author

In that scenario, potentially an application can use multiple models for its configuration which have different trees.

@samribeiro
Copy link
Member

There should always be the same root of the tree. You may have different roots if you use the origin field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants