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.

What about extending a union that previously included say just strings to 
include int8 as well - is that allowed under section 10 rules?

Thanks,

William

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email protected]] 
Sent: 19 April 2016 08:41
To: William Ivory <[email protected]>
Cc: [email protected]
Subject: Re: [netmod] Question about updating YANG modules

A type is essentially defining a set of allowed values.

If this set of values does not change (and the semantics associated with the 
values do not change), then you can change the type used in the type statement.

/js

On Tue, Apr 19, 2016 at 07:30:14AM +0000, William Ivory wrote:
> Hi,
> 
> Section 10 of the YANG RFC covers updating modules while maintaining 
> backwards-compatibiility.  I have a question about whether the following 
> statement allows for a string type to be replaced with a union comprising 
> solely of string types, so long as the overall set of strings accepted was no 
> more restrictive?  This would allow us to reuse some existing types.
> 
>    o  A "type" statement may be replaced with another "type" statement
>       that does not change the syntax or semantics of the type.  For
>       example, an inline type definition may be replaced with a typedef,
>       but an int8 type cannot be replaced by an int16, since the syntax
>       would change.
> 
> I can see that changing int8 to int16 changes the syntax, but does changing 
> from string to a union of strings change the syntax according to this 
> definition?
> 
> Thanks,
> 
> William
> 

> _______________________________________________
> netmod mailing list
> [email protected]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mail
> man_listinfo_netmod&d=CwIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=GByLeg9jZvOv_A
> lgBo9uvdDrxizlOR7l_SnTXowyJU8&m=eNnaJYadAK0Fvw2MfBD-jQYKBdoeq28VUey6fK
> A5B6s&s=lzSZQBGv2Xz2LtMHfvwQmV0K6i7olWuSvPFW9XEkA8M&e=


-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.jacobs-2Duniversity.de_&d=CwIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=GByLeg9jZvOv_AlgBo9uvdDrxizlOR7l_SnTXowyJU8&m=eNnaJYadAK0Fvw2MfBD-jQYKBdoeq28VUey6fKA5B6s&s=Dkya3b9AFYKFTljkbVtJKVHNDqJ5HzrP5jMxydI1FB4&e=
 >

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

Reply via email to