Search in sources :

Example 1 with ReactorException

use of org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException in project controller by opendaylight.

the class BenchmarkModel method createTestContext.

public static SchemaContext createTestContext() {
    final SchemaContext schemaContext;
    final List<InputStream> streams = Collections.singletonList(getInputStream());
    try {
        schemaContext = YangParserTestUtils.parseYangStreams(streams);
    } catch (ReactorException e) {
        throw new RuntimeException("Unable to build schema context from " + streams, e);
    }
    return schemaContext;
}
Also used : ReactorException(org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException) InputStream(java.io.InputStream) SchemaContext(org.opendaylight.yangtools.yang.model.api.SchemaContext)

Aggregations

InputStream (java.io.InputStream)1 SchemaContext (org.opendaylight.yangtools.yang.model.api.SchemaContext)1 ReactorException (org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException)1