-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
WriteOperations.mergeParentStructure{Merge,Put} provide legacy methods which are supposed to ensure creation on intermediate nodes between the specified target and root of the datastore.
When the path presented to these methods is a single component such that its YangInstanceIdentifier.size() == 1, BindingDOMWriteTransactionAdapter ends up doing the wrong thing, causing a datastore failure:
org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaValidationFailedException: Child /(urn:ietf:params:xml:ns:netconf:base:1.0)data is not present in schema tree. at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.resolveModificationFor(InMemoryDataTreeModification.java:182) at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.merge(InMemoryDataTreeModification.java:102) at org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.merge(SnapshotBackedWriteTransaction.java:92) at org.opendaylight.mdsal.dom.broker.DOMForwardedWriteTransaction.merge(DOMForwardedWriteTransaction.java:100) at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMWriteTransactionAdapter.ensureParentsByMerge(BindingDOMWriteTransactionAdapter.java:92) at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMWriteTransactionAdapter.mergeParentStructurePut(BindingDOMWriteTransactionAdapter.java:42)
While the caller should not do this (javadoc advises to steer clear of these methods unless necessary), it should behave like a no-op.