On Tue, Apr 19, 2016 at 08:02:24AM +0000, William Ivory wrote:
> OK - but changing from int8 to int16 still allows all previously
> allowed values, and simply adds some more, making it less
> restrictive. That isn't allowed though as noted in the bullet point
> from section 10 below.
Obviously, the set of allowed values changes when you replace int8 with
int16.
> What about extending a union that previously included say just strings to
> include int8 as well - is that allowed under section 10 rules?
This is an interesting question. Assuming you had
leaf a { type string; }
and you change it to
leaf a { type union { type int8; type string; } }
then for the XML encoding the set of values does not change however
for the JSON encoding it does change. See the JSON document for
subtleties associated with unions.
To prevent damage for encodings that carry some type information, we
might need a stricter interpretation of YANG compatibility rules...
/js
--
Juergen Schoenwaelder Jacobs University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax: +49 421 200 3103 <http://www.jacobs-university.de/>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod