Ladislav Lhotka <[email protected]> writes:
Hi,

>
> 2. The rogue vendor can use a must statement to achieve the same
> effect (or perhaps just state it in a description?). What’s important
> is whether the server that advertises such an extension rejects a
> configuration where the new parameter is missing or not.

As a follow-up to the discussion during the interim call, here is an
example of a module snippet that augments "ietf-interfaces" with a
mandatory node:

import ietf-interfaces {
  prefix if;
}

augment "/if:interfaces" {
  container top {
    must "foo";
    leaf accept {
      type boolean;
      default true;
    }
    leaf foo {
      type empty;
    }
  }
}

If a server advertises this module along with "ietf-interfaces", then,
according to the rules of YANG 1.0, a datastore without the "foo"
instance is invalid.

Therefore, I think it really makes no practical sense to insist on
restricting augments to non-mandatory nodes.

Lada

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

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

Reply via email to