11-03-2021 03:06 PM
I'm trying to generate a small example and for some reason nothing seems to be generated.
This is my yang file:
module ex-example { yang-version 1.1; namespace "ex:ex-example"; prefix qc; description "This YANG module has been created as an example"; revision "2021-11-03" { description "Initial Revision"; reference "I don't know what this string does"; } leaf thisisastring { type string; mandatory "true"; description "A string"; } leaf thisisabool { type boolean; mandatory "true"; description "A booelan"; } }
This is my profile:
{ "name": "example-profile", "version": "1.0.0", "core_version": "0.8.6", "description": "An example bundle profile", "models": { "dir": [ "yangprofiles" ] } }
and this is the result:
#ifndef _EX_EXAMPLE_ #define _EX_EXAMPLE_ #include <memory> #include <vector> #include <string> #include <ydk/types.hpp> #include <ydk/errors.hpp> namespace example_profile { namespace ex_example { } } #endif /* _EX_EXAMPLE_ */
I'm generating with `./generate.py --cpp --core --bundle profile.json`. What am I doing wrong?
Solved! Go to Solution.
11-04-2021 10:37 AM
The YDK does not support global leaf or leaf-list, so you need to put your leaf(s) into a container.
11-04-2021 10:37 AM
The YDK does not support global leaf or leaf-list, so you need to put your leaf(s) into a container.
11-04-2021 12:17 PM
That was it! Thank you so much.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide