With the three modules below, pyang issues an incorrect warning:
$ pyang a.yang b.yang c.yang
b.yang:7: warning: imported module a not used
Module "a" must be imported in "b" because the 'path' statement refers to a
node in "a".
If the 'import' statement is removed from "b", pyang (correctly) raises an
error.
== a.yang:
module a {
namespace "http://a";
prefix a;
container top {
leaf a {
type string;
}
}
}
== b.yang:
module b {
namespace "http://b";
prefix b;
import a {
prefix a;
}
grouping foo {
leaf b {
type leafref {
path "../a:a";
}
}
}
}
== c.yang:
module c {
namespace "http://c";
prefix c;
import a {
prefix a;
}
import b {
prefix b;
}
augment "/a:top" {
uses b:foo;
}
}
Original issue reported on code.google.com by lada.lho...@gmail.com on 28 Feb 2013 at 10:22
Original issue reported on code.google.com by
lada.lho...@gmail.com
on 28 Feb 2013 at 10:22