On Wed, Feb 23, 2022 at 2:37 PM Reshad Rahman <reshad=
[email protected]> wrote:

> Hi,
>
> My understanding is that we don't have any construct to easily do
> conditional default values. e.g. let's say I want interface MTU to have
> default 1500 for all types except 1. I tried by having conditional leaf
> nodes (using when on type) but I can't have duplicate leaf-nodes in the
> schema, even if the 2 when statements can never be true at the same time.
> Suggestions?
>
>

You can make clever use of the "union" data type to allow different
defaults.
You cannot really represent the conditions to pick a member type (except
description).


Regards,
> Reshad.
>


Andy


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

Reply via email to