Search in sources :

Example 1 with EffectiveStatementInference

use of org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference in project bgpcep by opendaylight.

the class AbstractConfigLoader method handleConfigFile.

@Holding("this")
private void handleConfigFile(final ProcessorContext context, final String filename) {
    final EffectiveStatementInference schema = context.schema;
    if (schema == null) {
        LOG.info("No schema present for {}, ignoring file {}", context.processor.fileRootSchema(), filename);
        return;
    }
    final NormalizedNode dto;
    try {
        dto = parseDefaultConfigFile(schema, filename);
    } catch (final IOException | XMLStreamException e) {
        LOG.warn("Failed to parse config file {}", filename, e);
        return;
    }
    LOG.info("Loading initial config {}", filename);
    context.processor.loadConfiguration(dto);
}
Also used : XMLStreamException(javax.xml.stream.XMLStreamException) EffectiveStatementInference(org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference) IOException(java.io.IOException) NormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode) Holding(org.checkerframework.checker.lock.qual.Holding)

Aggregations

IOException (java.io.IOException)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 Holding (org.checkerframework.checker.lock.qual.Holding)1 NormalizedNode (org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)1 EffectiveStatementInference (org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference)1