You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably I have a problem with understanding of the specification
draft-ietf-netmod-yang-05.
The specification says:
* All derived type names defined within a parent node or at the top-
level of the module or its submodules share the same type identifier
namespace. This namespace is scoped to the parent node or module.
If I get it correctly, the following example should be considered as valid:
module type-uniqueness
{
namespace "urn:test";
prefix u1;
container interface2 {
typedef str1 {
type string;
}
container interface2 {
typedef str1 {
type string;
}
}
}
}
Because both types are defined within different parent nodes and not at the
top-level of the module, i.e. the type identifiers belong to different
identifier namespaces. But pyang considers this as a collision.
If I the namespace for types is really defined in this way, then the
example should be invalid:
module type-uniqueness
{
namespace "urn:test";
prefix u1;
container interface2 {
typedef str1 {
type string;
}
container interface2 {
typedef str2 {
type str1;
}
}
}
}
Because the second type definition is out of the 'str1' type scope.
Original issue reported on code.google.com by kur...@gmail.com on 8 May 2009 at 9:36
I see that it was corrected in the specification and now it's clearly defined:
"All derived type names defined within a parent node or at the top-level of the
module or its submodules share the same type identifier namespace. This
namespace is
scoped to all descendant nodes of the parent node or module. This means that
any
descendent node may use that typedef, and it MUST NOT define a typedef with the
same
name".
The issue can be closed.
Original comment by kur...@gmail.com on 28 Jul 2009 at 2:57
Original issue reported on code.google.com by
kur...@gmail.com
on 8 May 2009 at 9:36Attachments:
The text was updated successfully, but these errors were encountered: