Hello, I’m a newbie of YANG modeling. I wanted to define a inheritance class tree using YANG modeling. For example, I have base class “c_fruit”, which can be a container in YANG. What’s the best way to define a child class of “c_fruit”, such as “c_apple”, in YANG? Can I use “augment” statement for this purpose. Thanks in advance for your suggestion!
Do you mean that c_apple
is container
that has all elements (leafs
, …) as c_fruit
+ new ones?
In this case I suggest to take a look at grouping
and refine
statements in the yang RFC. The idea is to prepare groupings with content, which can be reused in the containers
.