On Tue, Aug 23, 2016 at 04:13:23PM +0200, Jernej Tuljak wrote:
> Hi,
>
> this is a YANG 1, not 1.1 question.
[...]
> Note the "path" expression that is referencing names that do not
> seem to be in b's scope. Is this a valid "path" expression (names
> resolved upon usage) or should all names inside the "grouping" be
> resolved where the "grouping" is defined?
RFC 6020 says in section 7.12:
The effect of a "uses" reference to a grouping is that the nodes
defined by the grouping are copied into the current schema tree, and
then updated according to the "refine" and "augment" statements.
The identifiers defined in the grouping are not bound to a namespace
until the contents of the grouping are added to the schema tree via a
"uses" statement that does not appear inside a "grouping" statement,
at which point they are bound to the namespace of the current module.
This makes me believe that the uses statement should resolve things
to this:
submodule a {
belongs-to main {
prefix "a";
}
include b;
container top {
leaf top-leaf {
type string;
}
leaf some-leaf {
type leafref {
path "/top/top-leaf";
}
}
}
}
Other opinions? The text quoted from RFC 6020 only talks specifically
about identifiers but I would assume that the same late binding applies
to path statement arguments.
/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/>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod