Ladislav Lhotka <lho...@nic.cz> wrote:
> 
> > On 10 Sep 2015, at 13:45, Martin Bjorklund <m...@tail-f.com> wrote:
> > 
> > Ladislav Lhotka <lho...@nic.cz> wrote:
> >> 
> >>> On 10 Sep 2015, at 12:55, Martin Bjorklund <m...@tail-f.com> wrote:
> >>> 
> >>> Hi,
> >>> 
> >>> I think we agreed that is ok for a YANG 1.1 module to import a YANG
> >>> 1.0 module.
> >>> 
> >>> But should it also be ok for a 1.0 module to import a 1.1 module?
> >> 
> >> I think it should be illegal for a 1.0 module to import with revision
> >> if the requested revision is 1.1.
> > 
> > Ok.
> > 
> >>> If we make this illegal, we might run into problems.  For example,
> >>> ietf-ip imports ietf-interfaces.  Suppose we update ietf-interfaces
> >>> and the new version use YANG 1.1.  Is it ok for a server to implement
> >>> the 1.0 version of ietf-ip and 1.1 version of ietf-interfaces?  If the
> >>> answer is no, it means that we either have to update all modules to
> >>> 1.1 more or less at the same time (including vendor models!), or we
> >>> keep existing modules on 1.0 "forever".
> >>> 
> >>> At the lastest interim, it was suggested that a server that implements
> >>> such a combination of models would internally promote the 1.0 module
> >>> to 1.1, and thus make this combination legal.
> >> 
> >> I think we need a way for the server to identify itself to the client
> >> as 1.1-capable, and then:
> >> 
> >> - 1.1-capable server: if 1.0 module X imports Y *without revision*, and
> >>  the revision of Y advertised by the server (with
> >>  default-revision=true), then module X is automatically interpreted as
> >>  1.1.
> > 
> > I assume you mean that Y is 1.1.
> 
> Yup.
> 
> > 
> >> - 1.0-only server: if 1.0 module X import Y without revision, then the
> >>  latest 1.0 revision of Y is used. If 1.1 revisions exist, they are not
> >>  used.
> > 
> > Yes.
> > 
> >>> Such a strategy should also be safe for old clients, still treating
> >>> the module as being 1.0.
> >> 
> >> I am not sure about this, I think a 1.0-only client cannot work with a
> >> 1.1-capable server is some 1.1 additions are used (e.g. if-feature
> >> expressions).
> > 
> > Note that the 1.0 client worked with the 1.0 server with 1.0 modules X
> > and Y before.  Now Y is updated to 1.1.  According to section 10, Y is
> > not allowed to add if-feature to existing definitions.
> 
> New (non-mandatory) nodes may be added to Y that use if-feature
> expressions, new XPath functions etc., and the old client can actually
> receive instances of these nodes in the configuration.

Sure.  But new optional leafs could be added in an upgraded 1.0 model
as well, so the client needs to either be prepared to handle this, or
decide to close the connection when it realizes that it does not
understand all revisions of all data models.


/martin

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to