X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fcluster%2Fdatastore%2Fmodel%2FTestModel.java;h=cfbaee6f61b834db8042eb11fcc374094191c008;hp=836d7f9cfa9510139a88170688ebc93820387313;hb=c8121ea6b5bf54c43777afe6a747be40637e1f42;hpb=20a32e6459fd1e27e7669bf1ebc7742b96787b94 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java index 836d7f9cfa..cfbaee6f61 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java @@ -60,6 +60,10 @@ public final class TestModel { return YangParserTestUtils.parseYangResource(DATASTORE_TEST_YANG); } + public static DataContainerChild outerMapNode() { + return ImmutableNodes.mapNodeBuilder(OUTER_LIST_QNAME).build(); + } + public static DataContainerChild outerNode(final int... ids) { CollectionNodeBuilder outer = ImmutableNodes.mapNodeBuilder(OUTER_LIST_QNAME); for (int id: ids) { @@ -101,7 +105,7 @@ public final class TestModel { } public static NodeIdentifierWithPredicates outerEntryKey(final int id) { - return new NodeIdentifierWithPredicates(OUTER_LIST_QNAME, ID_QNAME, id); + return NodeIdentifierWithPredicates.of(OUTER_LIST_QNAME, ID_QNAME, id); } public static YangInstanceIdentifier outerEntryPath(final int id) { @@ -109,10 +113,14 @@ public final class TestModel { } public static NodeIdentifierWithPredicates innerEntryKey(final String name) { - return new NodeIdentifierWithPredicates(INNER_LIST_QNAME, NAME_QNAME, name); + return NodeIdentifierWithPredicates.of(INNER_LIST_QNAME, NAME_QNAME, name); } public static YangInstanceIdentifier innerEntryPath(final int id, final String name) { return OUTER_LIST_PATH.node(outerEntryKey(id)).node(INNER_LIST_QNAME).node(innerEntryKey(name)); } + + public static YangInstanceIdentifier innerMapPath(final int id) { + return OUTER_LIST_PATH.node(outerEntryKey(id)).node(INNER_LIST_QNAME); + } }