import org.opendaylight.controller.md.cluster.datastore.model.CarsModel;
import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
NormalizedNode<?, ?> expectedNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
NormalizedNode<?, ?> expectedNode2 = ImmutableNodes.containerNode(CarsModel.CARS_QNAME);
- Optional<NormalizedNode<?, ?>> optional = NormalizedNodeAggregator.aggregate(YangInstanceIdentifier.builder().build(),
+ Optional<NormalizedNode<?, ?>> optional = NormalizedNodeAggregator.aggregate(YangInstanceIdentifier.EMPTY,
ImmutableList.of(
Optional.<NormalizedNode<?, ?>>of(getRootNode(expectedNode1, schemaContext)),
Optional.<NormalizedNode<?, ?>>of(getRootNode(expectedNode2, schemaContext))),
- schemaContext);
+ schemaContext, LogicalDatastoreType.CONFIGURATION);
NormalizedNode<?,?> normalizedNode = optional.get();
DOMStoreWriteTransaction writeTransaction = store.newWriteOnlyTransaction();
- writeTransaction.merge(YangInstanceIdentifier.builder().node(moduleNode.getNodeType()).build(), moduleNode);
+ writeTransaction.merge(YangInstanceIdentifier.of(moduleNode.getNodeType()), moduleNode);
DOMStoreThreePhaseCommitCohort ready = writeTransaction.ready();
DOMStoreReadTransaction readTransaction = store.newReadOnlyTransaction();
CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read = readTransaction
- .read(YangInstanceIdentifier.builder().build());
+ .read(YangInstanceIdentifier.EMPTY);
Optional<NormalizedNode<?, ?>> nodeOptional = read.checkedGet();