use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec in project controller by opendaylight.
the class DsbenchmarkProvider method cleanupTestStore.
private void cleanupTestStore() {
TestExec data = new TestExecBuilder().setOuterList(Collections.<OuterList>emptyList()).build();
WriteTransaction tx = simpleTxDataBroker.newWriteOnlyTransaction();
tx.put(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
LOG.debug("DataStore config test data cleaned up");
} catch (final TransactionCommitFailedException e) {
LOG.info("Failed to cleanup DataStore configtest data");
throw new IllegalStateException(e);
}
tx = simpleTxDataBroker.newWriteOnlyTransaction();
tx.put(LogicalDatastoreType.OPERATIONAL, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
LOG.debug("DataStore operational test data cleaned up");
} catch (final TransactionCommitFailedException e) {
LOG.info("Failed to cleanup DataStore operational test data");
throw new IllegalStateException(e);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec in project controller by opendaylight.
the class DsbenchmarkListener method logDataTreeChangeEvent.
private static synchronized void logDataTreeChangeEvent(final int eventNum, final Collection<DataTreeModification<TestExec>> changes) {
LOG.debug("DsbenchmarkListener-onDataTreeChanged: Event {}", eventNum);
for (DataTreeModification<TestExec> change : changes) {
final DataObjectModification<TestExec> rootNode = change.getRootNode();
final ModificationType modType = rootNode.getModificationType();
final PathArgument changeId = rootNode.getIdentifier();
final Collection<DataObjectModification<? extends DataObject>> modifications = rootNode.getModifiedChildren();
LOG.debug(" changeId {}, modType {}, mods: {}", changeId, modType, modifications.size());
for (DataObjectModification<? extends DataObject> mod : modifications) {
LOG.debug(" mod-getDataAfter: {}", mod.getDataAfter());
}
}
}
Aggregations