Hi,

JOEY BOYD <[email protected]> wrote:
> Hi all,
> 
> An issue arose recently where a certain tool failed to build the
> schema tree when a feature was turned off. The problem was that an
> augmenting module did not have the same if-feature statement as the
> node being augmented. For example, I have these two modules.
> 
> module base-module {
>   prefix bmod;
> 
>   feature do-things;
> 
>   container things {
>     if-feature do-things;
>     ...
>   }
> }
> 
> module augment-module {
>   prefix amod;
> 
>   augment "/bmod:do-things" {
>     container other-things {
>     }
>   }
> }
> 
> If I included both modules and turned off the feature, 'do-things',
> the tool would complain that the node being augmented did not
> exist. Forgetting the obvious solution of not including the augmenting
> module if you don't support the feature (this is a very simplified
> example), my thought was that the schema tree should first be built
> including all augments, then the feature is applied.
> 
> What are your thoughts on this? Surely, an augment should not have to
> contain if-feature statements of all parents of the augmented node.

The spec says:

   When a server implements a module containing an "augment" statement,
   that implies that the server's implementation of the augmented module
   contains the additional nodes.

Compare with a simple augment of a node w/o an if-feature.  In this
case, if the server implements the augmenting module, it MUST also
implement the augmented module.



/martin

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to