MDSAL-298: properly handle unkeyed lists 62/67662/4
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2018 13:22:35 +0000 (14:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 5 Feb 2018 12:08:54 +0000 (13:08 +0100)
commitd6dc62697ecc8fea9098fb2011a666312c1f0ff7
tree644660b0d8f5d99c79ff085aafa3bc2cffd29857
parentf81bccec7ac422dbcfdfba70dcfa22f9824b8e4c
MDSAL-298: properly handle unkeyed lists

Unkeyed lists are not representable in binding, which means they
cannot be reported as modified children, either. This has implications
for any data change which contains unrepresentable fields as child
modifications.

Previously we would report SUBTREE_MODIFIED for the container node,
but would fail to report any children, which is obviously wrong, as the
user is left guessing as to what exactly happened.

This patch modifies LazyDataObjectModification to report a WRITE event
if modifications to unrepresentable children are found in SUBTREE_MODIFIED
case.

It also reuses BindingStructuralType from md-sal, so that we do not have
two copies of this critical class lying around requiring maintenance.

Change-Id: I30599bc26d3c993c5b6c5e2f9e6f66144a530cb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingStructuralType.java [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java