CESNET / libnetconf

C NETCONF library
Other
113 stars 84 forks source link

sever fails with module that 'uses' a 'grouping' from a submodule - example provided #143

Closed tomdenesyk closed 8 years ago

tomdenesyk commented 8 years ago

Two files... blade.yang and bladesub.yang

when server runs fails with this trace Failed to resolve uses "tomtom" in model "blade", could not find such grouping in imports.

File contents follow are below:

It seems that netconfserver doesn't work with models that 'include''s and 'uses' a grouping from a submodule.

On the other hand I have verified works that if model 'imports' external module and 'uses' a grouping from it.

//////////////////////////////////////////////// // blade.yang module blade { namespace "http://example.net/blade"; prefix "blade"; include bladesub; container blade { container transition-function { uses tomtom; } } }

//////////////////////////////// // bladesub.yang submodule bladesub { belongs-to blade { prefix "blade";} grouping tomtom{ leaf t{ type uint32; } } }

rkrejci commented 8 years ago

You are right, neither libnetconf nor Netopeer support YANG's include statement (submodules). Import should work correctly.