}
}
- public static List<Module> findModules(final Collection<? extends Module> modules, final String moduleName) {
- List<Module> result = new ArrayList<>();
- for (Module module : modules) {
- if (module.getName().equals(moduleName)) {
- result.add(module);
- }
- }
- return result;
- }
-
public static EffectiveModelContext parseYangSources(final StatementStreamSource... sources)
throws ReactorException {
return RFC7950Reactors.defaultReactor().newBuild().addSources(sources).buildEffective();
return parseYangSources(files.toArray(new File[files.size()]));
}
- public static EffectiveModelContext parseYangSources(final String yangSourcesDirectoryPath)
- throws ReactorException, URISyntaxException, IOException, YangSyntaxErrorException {
-
- URL resourceDir = StmtTestUtils.class.getResource(yangSourcesDirectoryPath);
- File testSourcesDir = new File(resourceDir.toURI());
-
- return parseYangSources(testSourcesDir.listFiles(
- (dir, name) -> name.endsWith(YangConstants.RFC6020_YANG_FILE_EXTENSION)));
- }
-
public static EffectiveModelContext parseYangSource(final String yangSourceFilePath)
throws ReactorException, URISyntaxException, IOException, YangSyntaxErrorException {