Hi, I completed two examples, one using the augment method that we were using, which you pointed out was broken. Thank you for helping with this, and I hope you have a moment to review my test files... probably there is a *third* way that works better.
What we want is to be able to write extensions in different RFCs, and then be able to compose them together easily. And yes, I get errors: MODULE D module-D2.yang:14: warning: imported module "module-A" not used module-D2.yang:37: error: the 'yang-data' extension must have exactly one child that is a container module-D2.yang:39: error: there is already a child node to "module-D2-artifact" at module-D2.yang:37 with the name "module-A-things" defined at module-D2.yang:39 (at module-A.yang:30) module-D2.yang:47: error: node module-D2::module-B2-things is not found module-D2.yang:55: error: there is already a child node to "module-D2-grouping" at module-D2.yang:42 with the name "module-A-things" defined at module-D2.yang:45 (at module-A.yang:30) module-D2.yang:56: error: node module-D2::module-C2-things is not found My first example (D1) created new grouping, which I import separately, but do not augment. But, the results has quite a bit of unwanted "structure": MODULE D module: module-D1 grouping module-D1-grouping: +-- module-D1-things +-- module-A-things | +-- attribute-A-Alpha? binary +-- module-B-things | +-- module-A-things | | +-- attribute-A-Alpha? binary | +-- attribute-B-Alpha? binary +-- module-C1-things | +-- module-A-things | | +-- attribute-A-Alpha? binary | +-- attribute-C1-Gamma? binary +-- attribute-D-Delta? binary Maybe there is a way to fix this to be saner. It's all in a git repo, https://github.com/mcr/yang-augment-test The file "practice1.sh" uses the method with multiple uses, which I think it was has been recommended, but looks weird above: grouping module-D1-grouping { description "Grouping for module D1"; container module-D1-things { uses vA:module-A-grouping; uses vB:module-B-grouping; uses vC1:module-C1-grouping; leaf attribute-D-Delta { type binary; description "Delta"; } } } The file practice2.sh uses the old method we were using with augment, which does *not* work. -- Michael Richardson <mcr+i...@sandelman.ca>, Sandelman Software Works -= IPv6 IoT consulting =-
signature.asc
Description: PGP signature
_______________________________________________ Anima mailing list Anima@ietf.org https://www.ietf.org/mailman/listinfo/anima