clicon/clixon

Yang submodule import prefix restrictions

Closed this issue · 1 comments

Submodules cannot re-use a prefix in an import statement that is already used for another imported module in the module that the submodule belongs to.
In the example below, the submodule S is included by M, and therefore cannot use the prefix "p" for another module (M2) than the one imported by M (M1). It is OK if S imports M1 using p.

submodule S{
  belongs-to "M";
  import M2 { prefix p; } <<---- Must not be p since it is used by M
}
module M{
  include S;
  import M1 { prefix p; }
}

Fixed by commit^