[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [YANG] import statement



Ladislav Lhotka <lhotka at cesnet.cz> wrote:
> Martin Bjorklund píše v So 03. 05. 2008 v 22:24 +0200:
> > > Then augment performs two fundamentally different things  
> > 
> > I don't agree.  Why?
> > 
> 
> With the absolute argument, augment inserts something carrying its own
> namespace in between foreign namespace nodes. In particular, no name
> conflicts can ever happen.
> 
> With uses and the descendant form of augment, you are first adopting
> something to your namespace and then modifying it. Names can clash here.
> For example, the author of the imported module may add an optional node
> to a grouping that from his point of view is perfectly backward
> compatible change. This may however break the importing module if a node
> added by augment happens to have the same name and is added at the same
> place.

This is more an effect of how uses work than how augment works.
Consider this case:

   uses foo:bar;
   uses goo:baz;

If foo:bar contains container 'a' and goo:baz container 'b',
everything is fine.  Now, if foo is updated and a container 'b' is
added to the bar grouping, there will be a name collision in my
module.

There are several solutions to this problem.  One is to use the
versioned imports we talk about in some other thread.


/martin
_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang