final SessionIdType sessionId) {
final var tx = txChain.newWriteOnlyTransaction();
LOG.trace("{}: Update device state transaction {} merging operational data started.", id, tx.getIdentifier());
-
- // FIXME: this needs to be tied together with node's operational existence
- tx.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, netconfNodePath(),
+ tx.put(LogicalDatastoreType.OPERATIONAL, netconfNodePath(),
newNetconfNodeBuilder(up, capabilities, sessionId).build());
LOG.trace("{}: Update device state transaction {} merging operational data ended.", id, tx.getIdentifier());
commitTransaction(tx, "update");
final NetconfDeviceCapabilities capabilities, final SessionIdType sessionId) {
final var tx = txChain.newWriteOnlyTransaction();
LOG.trace("{}: Update device state transaction {} merging operational data started.", id, tx.getIdentifier());
- tx.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, netconfNodePath(),
- newNetconfNodeBuilder(up, capabilities, sessionId)
- .setClusteredConnectionStatus(new ClusteredConnectionStatusBuilder()
- .setNetconfMasterNode(masterAddress)
- .build())
- .build());
+ tx.put(LogicalDatastoreType.OPERATIONAL, netconfNodePath(), newNetconfNodeBuilder(up, capabilities, sessionId)
+ .setClusteredConnectionStatus(new ClusteredConnectionStatusBuilder()
+ .setNetconfMasterNode(masterAddress)
+ .build())
+ .build());
LOG.trace("{}: Update device state transaction {} merging operational data ended.", id, tx.getIdentifier());
-
commitTransaction(tx, "update");
}
final var tx = txChain.newWriteOnlyTransaction();
LOG.trace("{}: Setting device state as failed {} putting operational data started.", id, tx.getIdentifier());
- tx.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, netconfNodePath(), data);
+ tx.put(LogicalDatastoreType.OPERATIONAL, netconfNodePath(), data);
LOG.trace("{}: Setting device state as failed {} putting operational data ended.", id, tx.getIdentifier());
commitTransaction(tx, "update-failed-device");
}
@Test
public void testFailedDevice() {
// FIXME: exact match
- doNothing().when(mockTx).mergeParentStructurePut(eq(LogicalDatastoreType.OPERATIONAL),
- any(InstanceIdentifier.class), any(NetconfNode.class));
+ doNothing().when(mockTx).put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class),
+ any(NetconfNode.class));
adapter.setDeviceAsFailed(null);
@Test
public void testDeviceUpdate() throws Exception {
- doNothing().when(mockTx).mergeParentStructurePut(eq(LogicalDatastoreType.OPERATIONAL),
- any(InstanceIdentifier.class), any(NetconfNode.class));
+ // FIXME: exact match
+ doNothing().when(mockTx).put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class),
+ any(NetconfNode.class));
adapter.updateDeviceData(true, NetconfDeviceCapabilities.empty(), new SessionIdType(Uint32.ONE));
verify(mockChain, times(2)).newWriteOnlyTransaction();
assertSame(Empty.value(), Futures.getDone(future));
}
-
@Test
public void testShutdownCompletion() throws Exception {
// FIXME: exact match