[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [YANG] import statement
Martin Bjorklund píše v So 03. 05. 2008 v 23:21 +0200:
>
> This is more an effect of how uses work than how augment works.
Yes and no - in this case augment makes very little sense without the
corresponding use statement. Effectively, the semantics of the two cases
are:
1. Reuse a foreign grouping in the local module, with optional
modifications.
2. Modify a schema tree (non-grouping) node in the foreign model.
Is it right that with 1 the device normally wouldn't advertise the
imported URI along with the local URI in hello? In case 2 it has to
since the absolute form of augment has otherwise no effect.
RELAX NG has an extension construct that is almost identical to 1, but
no equivalent for 2.
> 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.
True, but here the collision can only occur at the top level of both
groupings, which is not very likely and easy to spot, whereas augment
can descend to any depth of the grouping hierarchy and cause the
conflict there.
Lada
--
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C
_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang