本文整理汇总了Java中org.opendaylight.controller.md.cluster.datastore.model.PeopleModel.emptyContainer方法的典型用法代码示例。如果您正苦于以下问题:Java PeopleModel.emptyContainer方法的具体用法?Java PeopleModel.emptyContainer怎么用?Java PeopleModel.emptyContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.controller.md.cluster.datastore.model.PeopleModel
的用法示例。
在下文中一共展示了PeopleModel.emptyContainer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testWriteTransactionWithMultipleShards
import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testWriteTransactionWithMultipleShards() throws Exception {
initDatastoresWithCarsAndPeople("testWriteTransactionWithMultipleShards");
final DOMStoreWriteTransaction writeTx = followerDistributedDataStore.newWriteOnlyTransaction();
assertNotNull("newWriteOnlyTransaction returned null", writeTx);
final YangInstanceIdentifier carsPath = CarsModel.BASE_PATH;
final NormalizedNode<?, ?> carsNode = CarsModel.emptyContainer();
writeTx.write(carsPath, carsNode);
final YangInstanceIdentifier peoplePath = PeopleModel.BASE_PATH;
final NormalizedNode<?, ?> peopleNode = PeopleModel.emptyContainer();
writeTx.write(peoplePath, peopleNode);
followerTestKit.doCommit(writeTx.ready());
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
verifyNode(readTx, carsPath, carsNode);
verifyNode(readTx, peoplePath, peopleNode);
}
示例2: testReadWriteTransactionWithMultipleShards
import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testReadWriteTransactionWithMultipleShards() throws Exception {
initDatastoresWithCarsAndPeople("testReadWriteTransactionWithMultipleShards");
final DOMStoreReadWriteTransaction rwTx = followerDistributedDataStore.newReadWriteTransaction();
assertNotNull("newReadWriteTransaction returned null", rwTx);
final YangInstanceIdentifier carsPath = CarsModel.BASE_PATH;
final NormalizedNode<?, ?> carsNode = CarsModel.emptyContainer();
rwTx.write(carsPath, carsNode);
final YangInstanceIdentifier peoplePath = PeopleModel.BASE_PATH;
final NormalizedNode<?, ?> peopleNode = PeopleModel.emptyContainer();
rwTx.write(peoplePath, peopleNode);
followerTestKit.doCommit(rwTx.ready());
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
verifyNode(readTx, carsPath, carsNode);
verifyNode(readTx, peoplePath, peopleNode);
}
示例3: testMergeWithInvalidNamespace
import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testMergeWithInvalidNamespace() throws DataValidationFailedException {
NormalizedNode<?, ?> normalizedNode = PeopleModel.emptyContainer();
YangInstanceIdentifier path = PeopleModel.BASE_PATH;
pruningDataTreeModification.merge(path, normalizedNode);
verify(mockModification, times(1)).merge(path, normalizedNode);
DataTreeCandidateTip candidate = getCandidate();
assertEquals("getModificationType", ModificationType.UNMODIFIED, candidate.getRootNode().getModificationType());
}
示例4: testWriteWithInvalidNamespace
import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testWriteWithInvalidNamespace() throws DataValidationFailedException {
NormalizedNode<?, ?> normalizedNode = PeopleModel.emptyContainer();
YangInstanceIdentifier path = PeopleModel.BASE_PATH;
pruningDataTreeModification.write(path, normalizedNode);
verify(mockModification, times(1)).write(path, normalizedNode);
DataTreeCandidateTip candidate = getCandidate();
assertEquals("getModificationType", ModificationType.UNMODIFIED, candidate.getRootNode().getModificationType());
}