[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [YANG] import statement
On Sat, May 03, 2008 at 04:00:37PM +0200, Ladislav Lhotka wrote:
> Then the one and only way for utilizing the imported name "foo-cont" in
> module bar is in
>
> augment /foo:foo-cont {
> ...
> }
>
> which results in placing (possibly augmented) copy of the "foo-cont"
> container at the location of the augment statement. Or am I missing
> something?
You are missing something. ;-) Here is what the YANG ID says (section
7.15):
The "augment" statement allows a module or submodule to add to the
schema tree defined in another module or submodule.
And section 3:
o augment: Adds new nodes to a previously defined node.
And section 4.2.8:
YANG allows a module to insert additional nodes into data models,
including both the current module (and its submodules) or an external
module. This is useful e.g. for vendors to add vendor-specific
parameters to standard data models in an interoperable way.
The "augment" statement defines the location in the data model
hierarchy where new nodes are inserted, and the "when" statement
defines the conditions when the new nodes are valid.
There are also examples. An augment of foo-cont simply sticks nodes
into the foo-cont container; there is no new instantiation of
foo-cont.
/js
--
Juergen Schoenwaelder Jacobs University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany
Fax: +49 421 200 3103 <http://www.jacobs-university.de/>
_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang