Normally, when I have submodule yang files, I will put these files into a directory which is named as the module name, and this directory will be in the same level as module, e.g.
network.yang network : -- network_sub0.yang -- network_sub1.yang
This structure is clear and works well when I compile these yang files using confdc.
But in some cases for some reasons, which I can’t create a directory for these submodules, I have put the submodules at the same level as module:
network.yang network_sub0.yang network_sub1.yang
I try to compiled and I got errors like
error: cannot compile submodules; compile the module instead
But finally I think the compilation still succeed. I restart confd and I think I can see the proper structure thru confd_cli.
So I want to confirm putting submodule yang files in the same directory as the module is legal, there should not be any problem for compilation/load although I got error message during compilation, correct ?