Details
-
Improvement
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: Windows
Platform: PC
Description
What I need is an option like
parseYangModels(File yangFile, File directory)
Currently I need to do something like this this :
List<File> yangFiles = new ArrayList<File>();
yangFiles.add(new File("IF-MIB.yang"));
yangFiles.add(new File("iana-if-type.yang"));
yangFiles.add(new File("SNMPv2-TC.yang"));
yangFiles.add(new File("ietf-yang-types.yang"));
YangModelParser parser = new YangParserImpl();
Set<Module> modules = new HashSet<Module>();
modules = parser.parseYangModels(yangFiles);
Of course hard-coding won't work, so otherwise I'll need to parse each Yang file and compute the import transitive closure myself.
I think this would be a useful addition to the API.