[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [YANG] import statement
Ladislav Lhotka 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.
>
> The syntax
>
> uses foo:bar {
> augment baz {
> ...
> }
> }
> uses boo:hoo;
>
> has at least the advantage that it doesn't matter if boo:hoo uses baz.
>
no -
If grouping 'boo:hoo' has a top-level node named 'baz' in it,
it will clash no matter where these clauses are placed.
Remember that a 'uses-stmt' does not add any containment,
and neither does the grouping being referenced.
Choices and cases do not add any containment.
All the child nodes of these constructs can clash, and the
compiler needs to generate a fatal error if that happens.
> Lada
>
Andy
_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang