X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Futils%2FNormalizedNodeAggregator.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Futils%2FNormalizedNodeAggregator.java;h=0d2f65b9780118d7954bc1cbcf07e5542b9aef0b;hp=8d5994ea399de7f1e95f0724bc57dd185f9e01a4;hb=b9711f17a53a4fad48197df6c39b58e4faadc862;hpb=4e991c7dc07090690a29b20c962b24ee4dd1f157 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregator.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregator.java index 8d5994ea39..0d2f65b978 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregator.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregator.java @@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguratio import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; public final class NormalizedNodeAggregator { private final YangInstanceIdentifier rootIdentifier; @@ -26,21 +26,21 @@ public final class NormalizedNodeAggregator { private final DataTree dataTree; private NormalizedNodeAggregator(final YangInstanceIdentifier rootIdentifier, - final List>> nodes, final SchemaContext schemaContext, + final List>> nodes, final EffectiveModelContext schemaContext, final LogicalDatastoreType logicalDatastoreType) { this.rootIdentifier = rootIdentifier; this.nodes = nodes; this.dataTree = new InMemoryDataTreeFactory().create( logicalDatastoreType == LogicalDatastoreType.CONFIGURATION ? DataTreeConfiguration.DEFAULT_CONFIGURATION : DataTreeConfiguration.DEFAULT_OPERATIONAL); - this.dataTree.setSchemaContext(schemaContext); + this.dataTree.setEffectiveModelContext(schemaContext); } /** * Combine data from all the nodes in the list into a tree with root as rootIdentifier. */ public static Optional> aggregate(final YangInstanceIdentifier rootIdentifier, - final List>> nodes, final SchemaContext schemaContext, + final List>> nodes, final EffectiveModelContext schemaContext, final LogicalDatastoreType logicalDatastoreType) throws DataValidationFailedException { return new NormalizedNodeAggregator(rootIdentifier, nodes, schemaContext, logicalDatastoreType).aggregate(); }