netopeer icon indicating copy to clipboard operation
netopeer copied to clipboard

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

Open li9270 opened this issue 5 years ago • 3 comments

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?

li9270 avatar Mar 02 '20 05:03 li9270

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

michalvasko avatar Mar 02 '20 07:03 michalvasko

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?

li9270 avatar Mar 03 '20 06:03 li9270

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

michalvasko avatar Mar 03 '20 08:03 michalvasko