Merge changes I4ec69712,I8348002a,I7e6abbf1,Idc2294da
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / sal / NetconfDeviceDatastoreAdapter.java
index 04d5e5e449e1f00305a8be995b3861d7ef24e47b..8590c491e470de643c156c5c5f20db6c5c96352e 100644 (file)
@@ -37,7 +37,10 @@ import org.slf4j.LoggerFactory;
  * Asynchronous (Binding-aware) adapter over datastore subtree for netconf device.
  *
  * All data changes are submitted to an ExecutorService to avoid Thread blocking while sal is waiting for schema.
+ *
+ * @deprecated Data is pushed into Topology instead if Inventory model
  */
+@Deprecated
 final class NetconfDeviceDatastoreAdapter implements AutoCloseable {
 
     private static final Logger logger  = LoggerFactory.getLogger(NetconfDeviceDatastoreAdapter.class);
@@ -58,7 +61,7 @@ final class NetconfDeviceDatastoreAdapter implements AutoCloseable {
 
         final ReadWriteTransaction transaction = dataService.newReadWriteTransaction();
         logger.trace("{}: Update device state transaction {} merging operational data started.", id, transaction.getIdentifier());
-        transaction.merge(LogicalDatastoreType.OPERATIONAL, id.getBindingPath(), data);
+        transaction.put(LogicalDatastoreType.OPERATIONAL, id.getBindingPath(), data);
         logger.trace("{}: Update device state transaction {} merging operational data ended.", id, transaction.getIdentifier());
 
         commitTransaction(transaction, "update");
@@ -83,11 +86,11 @@ final class NetconfDeviceDatastoreAdapter implements AutoCloseable {
         final Node nodeWithId = getNodeWithId(id);
 
         logger.trace("{}: Init device state transaction {} putting if absent operational data started.", id, transaction.getIdentifier());
-        transaction.merge(LogicalDatastoreType.OPERATIONAL, path, nodeWithId);
+        transaction.put(LogicalDatastoreType.OPERATIONAL, path, nodeWithId);
         logger.trace("{}: Init device state transaction {} putting operational data ended.", id, transaction.getIdentifier());
 
         logger.trace("{}: Init device state transaction {} putting if absent config data started.", id, transaction.getIdentifier());
-        transaction.merge(LogicalDatastoreType.CONFIGURATION, path, nodeWithId);
+        transaction.put(LogicalDatastoreType.CONFIGURATION, path, nodeWithId);
         logger.trace("{}: Init device state transaction {} putting config data ended.", id, transaction.getIdentifier());
 
         commitTransaction(transaction, "init");