-
Notifications
You must be signed in to change notification settings - Fork 72
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
Need help to add new yang file #24
Comments
You need to import it from one of the existing yang modules. The main one or one (transitively) imported by the main module. |
Thanks a lot. I forgot to do configure again. |
Adding to this is there a simple way to populate the incoming buffer (cvec *cvv) into some autogenerated structures-per-yang. So that user can push only these structures to lower layers for processing? |
^^ Yes agree, the CLI show commands get big and nested as they are written in example_cli.cli. Should add something like: |
^^populate incoming buffers. You mean the cli callbacks, such as cli_set()? Can you please elaborate. What kind of data do you want to give - how and where does a user define it? |
Yes assume I get some values in cli_set based on following commands yang2: to implement the functionality, assume I have two processes ipsecmgr and l2tpmgr case L2TP_YANG: can the structure and the get function be autogenerated as part of yang parsing? struct ipsec_info |
This is the info that is built in the XML structure using cli_set, as you know, just not in a C-specific struct. This would need a C-struct generating step from Yang, ie to generate struct l2tp_info and struct ipsec_info above from the yang specification. |
…e tree with auto completion. * A typical call is: show @datamodel:example, cli_show_auto("candidate", "json"); * The example contains a more elaborate example. * Thanks ngashok for request, see #24
Added a generated show command as discussed further up the thread.
|
Awesome! That was quick. Thanks a lot. It will be very useful for me. |
I was also looking for same changes. |
I think "No' also should support nested yang just like set. Just a suggestion. If set has configured something. Not sure how we can do "no" of that config, as no doesnt show up that grammar now. |
@ngashok , I think the example has what you want: |
Wanted to add something similar to interfaces.
Added a new data model similar to interfaces and stored it in example directory.
changed the Makefile.in only to add this new yang file.
After this I was expecting the CLI to atleast show up the new one after i do "set ?"
Anything else I need to do as I dint find anything sepcific for other yang files, If i need to config and display (without any other functionality)
The text was updated successfully, but these errors were encountered: