1

RFC6020 contains the following statement "A NETCONF server may implement a number of modules, allowing multiple views of the same data" (my emphasis). I want to do exactly that, so that my NETCONF server can expose different parts of my device's overall data model to different clients. In some cases, the views exposed to different clients might overlap.

The question is, how does YANG support this? One might think that in one module you could include a container that is defined in another module, but as far as I know that is not supported in YANG. I know that you can use "augment" to add data items to an existing item that is defined in an imported module, but I just want to reuse a container from another module 'as is'.

I would be grateful for any suggestions as to how to achieve this.

  • You might want to check stackoverflow.com. There seems to be more people familiar with Yang over there. – Ron Trunk May 1 '18 at 11:44
2

While YANG supports imports, that sentence sounds as if it meant that different YANG models might provide access to the same set of underlying non-YANG data in different formats. As a hypothetical example, consider the IETF vs. OpenConfig standards which both define a way on how to, say, assign IP addresses to interfaces. A NETCONF server can therefore provide both ietf-interfaces and its corresponding OpenConfig equivalent.

This of course might be tricky to do properly on some NETCONF server software stacks because one has to decide whether to somehow propagate changes in one such model to the other one to ensure consistency, etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.