Details
-
Bug
-
Status: Resolved
-
Medium
-
Resolution: Cannot Reproduce
-
None
-
None
Description
When using module containing only extension(s), the $YangModuleInfoImpl.java class for this module is not generated.
As a workaround, the extension module needs to contain at least one other element - It works when (at least) container or identity was added to module.
module with extension defined:
module extension-model {
yang-version 1;
namespace "extension-model";
prefix "ex";
revision "2020-08-13" { }
extension custom-ex {
description ".....";
}
}
module where extension is used:
module main-model {
yang-version 1;
namespace "main-model";
prefix "main";
import extension-model { prefix "ex"; }
revision "2020-08-13" { }
container root-contaner {
leaf leaf1 {
type string;
ex:custom-ex;
}
}
}
for these it will not generate $YangModuleInfoImpl.java class file.
the $YangModuleInfoImpl.java class will be generated if extension model is updated by adding dummy container:
module extension-model {
yang-version 1;
namespace "extension-model";
prefix "ex";
revision "2020-08-13" { }
extension custom-ex {
description ".....";
}
container dummy {
// necessary element in only extensions model
}
}
Example models are shown also in gerrit change 92155