-
Notifications
You must be signed in to change notification settings - Fork 12
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
odd question #17
Comments
Hi @snmpboy. My apologies for the late reply, I was traveling.
Yes, definitely. You can either use the same or separate trees for config and state, depending on your requirements.
Sure. In the Holo routing stack, for example, there's a gRPC frontend that works more or less like that. You can feed JSON payloads to change the running configuration, or request state data in the JSON format, among several other things. Links for reference:
So yes, you could create a restful API similar to that. Let me know if that answers your question. |
Yes, it very much answers my question. Now to convince my manager it's
worth the company's time.
…On Wed, Aug 21, 2024 at 9:05 PM Renato Westphal ***@***.***> wrote:
Hi @snmpboy <https://github.com/snmpboy>. My apologies for the late
reply, I was traveling.
Is it possible to build a huge data tree structure to keep in memory.
Maybe two trees. One for config and one for data (state) since RFC's seem
to keep those separate as do the models I have seen so far.
Yes, definitely. You can either use the same or separate trees for config
and state, depending on your requirements.
If that can be done, then you can create a restful API with JSON payloads
that would simply build out the XML and then send it to the device and get
what you want. In some cases like lists, no JSON payload is necessary, just
send back all items in the list. Is this feasible?
Sure. In the Holo routing stack, for example, there's a gRPC frontend that
works more or less like that. You can feed JSON payloads to change the
running configuration, or request state data in the JSON format, among
several other things.
Links for reference:
- https://github.com/holo-routing/holo/blob/master/proto/holo.proto
- https://github.com/holo-routing/holo/wiki/gRPC
So yes, you could create a restful API similar to that. Let me know if
that answers your question.
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFRYXVRWOB2M3KZZBURCCDZSU2PLAVCNFSM6AAAAABMFTFABWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBTGM3TGNBUGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Since there are few people writing issues, I will ask what may be a dumb question. Yang-rs will nicely output xml from a yang model. At least when I feed it a YANG model it has done so. Is it possible to build a huge data tree structure to keep in memory. Maybe two trees. One for config and one for data (state) since RFC's seem to keep those separate as do the models I have seen so far. If that can be done, then you can create a restful API with JSON payloads that would simply build out the XML and then send it to the device and get what you want. In some cases like lists, no JSON payload is necessary, just send back all items in the list. Is this feasible?
The text was updated successfully, but these errors were encountered: