Ladislav Lhotka <[email protected]> wrote:
> 
> > On 09 Dec 2015, at 15:28, Martin Bjorklund <[email protected]> wrote:
> > 
> > Ladislav Lhotka <[email protected]> wrote:
> >> or when augmenting a choice.
> > 
> > Sure, but this already works in YANG 1.0, since it technically doesn't
> > add any mandatory nodes.
> 
> module A:
> 
> choice foo {
> ...
> }
> 
> module B:
> 
> augment "A:/foo" {
>   container top {
>     leaf bar { type empty; }
>     leaf baz { mandatory true; type empty; }
>   }
> }
> 
> IMO this is also perfectly safe yet not allowed by your wording.

It is allowed even in YANG 1.

Note that there is a precise definition of "mandatory node", and note
that the augment really is:

  augment "A:/foo" {
    case top {
      container top {
        leaf bar { type empty; }
        leaf baz { mandatory true; type empty; }
      }
    }
  }


/martin

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

Reply via email to