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

How to understand the user-rpc of transapi and the relationship with edit-config? #188

Open
li9270 opened this issue Mar 2, 2020 · 3 comments

Comments

@li9270
Copy link

li9270 commented Mar 2, 2020

I want my hardware to support netconf.
Need I to add transapi module, and define some user-rpc?
Should I use the edit-config or user-rpc when I want to change the configuration of hardware and netopeer-cli got the change?

@michalvasko
Copy link
Member

Hi,
there is no need to define your own RPC if you do not have any custom operations to be performed on your device. If you want to just support configuration using NETCONF, edit-config is the standard operation that will do that. Also, note that this project (netopeer) is a really old one and obsolete, you should use netopeer2.

Regards,
Michal

@li9270
Copy link
Author

li9270 commented Mar 3, 2020

Hi,
Thanks for your advice.
If I write a example.yang with a leaf. Then I add it to netopeer-server,when I use get-config in netopeer-cli, how to get the leaf state that I add?
I see the netopeer1 has a lnctool. In netopeer2, if I write a example.yang, how to get the example.c?

@michalvasko
Copy link
Member

Hi,
obviously, you will not get the state leaf if you are executing get-config, try running get instead. As for how to write a plugin, look into the docs. Nothing is generated in netopeer2 because there is nothing to generate really, no specific callback names or anything similar is required.

Regards,
Michal

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

No branches or pull requests

2 participants