LOG.trace("Merge {} within Restconf PATCH: {} with payload {}", datastore.name(), path, payload);
ensureParentsByMerge(datastore, path, writeTransaction, schemaContext);
- // merging is necessary only for lists otherwise we can call put method
- if (payload instanceof MapNode) {
- writeTransaction.merge(datastore, path, payload);
- } else {
- writeTransaction.put(datastore, path, payload);
- }
+ // Since YANG Patch provides the option to specify what kind of operation for each edit,
+ // OpenDaylight should not change it.
+ writeTransaction.merge(datastore, path, payload);
}
public void setDomDataBroker(final DOMDataBroker domDataBroker) {
final SchemaContextRef schemaContextRef) {
LOG.trace("Merge {} within Restconf PATCH: {} with payload {}", dataStore.name(), path, payload);
TransactionUtil.ensureParentsByMerge(path, schemaContextRef.get(), writeTransaction);
-
- // merging is necessary only for lists otherwise we can call put method
- if (payload instanceof MapNode) {
- writeTransaction.merge(dataStore, path, payload);
- } else {
- writeTransaction.put(dataStore, path, payload);
- }
+ writeTransaction.merge(dataStore, path, payload);
}
/**