int writeCnt = 0;
DOMTransactionChain chain = domDataBroker.createTransactionChain(this);
+ LogicalDatastoreType dsType = getDataStoreType();
DOMDataWriteTransaction tx = chain.newWriteOnlyTransaction();
YangInstanceIdentifier pid = YangInstanceIdentifier.builder().node(TestExec.QNAME).node(OuterList.QNAME).build();
YangInstanceIdentifier yid = pid.node(new NodeIdentifierWithPredicates(OuterList.QNAME, element.getIdentifier().getKeyValues()));
if (oper == StartTestInput.Operation.PUT) {
- tx.put(LogicalDatastoreType.CONFIGURATION, yid, element);
+ tx.put(dsType, yid, element);
} else {
- tx.merge(LogicalDatastoreType.CONFIGURATION, yid, element);
+ tx.merge(dsType, yid, element);
}
writeCnt++;
}
});
tx = chain.newWriteOnlyTransaction();
+ dsType = getDataStoreType();
writeCnt = 0;
}
}
// *** Clean up and close the transaction chain ***
// Submit the outstanding transaction even if it's empty and wait for it to finish
// We need to empty the transaction chain before closing it
+
try {
txSubmitted++;
tx.submit().checkedGet();